Modify segmentation() function
adeschen opened this issue · 0 comments
1- segmentation(). The 'dataIP' argument is described 'reads that
need to be segmented'. Reads are represented most readily as
GAlignments() or GAlignmentPairs(), from the
GenomicAlignments package; should these be supported as input?
2- segmentation(). The example might more easiy coerce to GRanges
with
as(syntheticNucleosomeReads$dataIP, "GRanges")
3- segmentation() returns a simple list, but would be more convenient
as a GRangesList(), the equivalent of
GRangesList(segmentation(...))
4- segmentation() seems to assume that
length(unique(seqnames(dataIP))) == 1L?
5- segmentation() it seems like you're splitting based on overlap, so
a much more efficient implementation is
starts = seq(posMin, posMax, by = (maxLength - (zeta + delta)))
subject = GRanges(seqlevels(dataIP), IRanges(starts, width=maxLength)
hits = findOverlaps(dataIP, subject)
splitAsList(dataIP[queryHits(hits)], subjectHits(hits))