splitFarNeighbour {biomvRCNS} | R Documentation |
Split segments if long gaps exist between feature positions, due to low coverage or resolution.
splitFarNeighbour(intStart = NULL, intEnd = NULL, xPos = NULL, xRange = NULL, maxgap = Inf, minrun = 1)
intStart |
indices of start for each segment |
intEnd |
indices of end for each segment |
xPos |
position vector, the distance of neighbouring features will be counted as point to point |
xRange |
IRanges / GRanges object for the positions, the the distance of neighbouring features will be counted as end to start. |
maxgap |
maximum distance between neighbouring features |
minrun |
when splitting, the minimum length of the features spanning, which half will be ignored if shorter. |
a list object containing the start and end indices for new segments
IS |
the start indices for new segments |
IE |
the end indices for new segments |
Yang Du
set.seed(123) pos<-cumsum(rnbinom(20, size=10, prob=0.01)) splitFarNeighbour(intStart=c(1, 10), intEnd=c(6, 18), xPos=pos, maxgap=1000)