Description Usage Arguments Details Value See Also Examples
View source: R/ranges_helpers.R
Reduce away all GRanges elements with 0-width.
1 2 3 4 5 6 7 8 9 10 |
grl |
a |
keep.names |
(FALSE) keep the names and meta columns of the GRangesList |
drop.empty.ranges |
(FALSE) if a group is empty (width 0), delete it. |
min.gapwidth |
(1L) how long gap can it be between two ranges, to merge them. |
with.revmap |
(FALSE) return info on which mapped to which |
with.inframe.attrib |
(FALSE) For internal use. |
ignore.strand |
(FALSE), can different strands be reduced together. |
min.strand.decreasing |
(TRUE), if GRangesList, return minus strand group ranges in decreasing order (1-5, 30-50) -> (30-50, 1-5) |
Extends function reduce
by trying to keep names and meta columns, if it is a
GRangesList. It also does not lose sorting for GRangesList,
since original reduce sorts all by ascending position.
If keep.names == FALSE, it's just the normal GenomicRanges::reduce
with sorting negative strands descending for GRangesList.
A reduced GRangesList
Other ExtendGenomicRanges:
asTX()
,
coveragePerTiling()
,
extendLeaders()
,
extendTrailers()
,
tile1()
,
txSeqsFromFa()
,
windowPerGroup()
1 2 3 4 5 6 7 8 | ORF <- GRanges(seqnames = "1",
ranges = IRanges(start = c(1, 2, 3), end = c(1, 2, 3)),
strand = "+")
# For GRanges
reduceKeepAttr(ORF, keep.names = TRUE)
# For GRangesList
grl <- GRangesList(tx1_1 = ORF)
reduceKeepAttr(grl, keep.names = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.