reduceKeepAttr {ORFik}R Documentation

Reduce GRanges / GRangesList

Description

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. If keep.names == FALSE, it's just the normal GenomicRanges::reduce with sorting negative strands descending for GRangesList.

Usage

reduceKeepAttr(grl, keep.names = FALSE, drop.empty.ranges = FALSE,
  min.gapwidth = 1L, with.revmap = FALSE,
  with.inframe.attrib = FALSE, ignore.strand = FALSE)

Arguments

grl

a GRangesList or GRanges object

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 to say they belong together

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.

Value

A reduced GRangesList

See Also

Other ExtendGenomicRanges: asTX, coveragePerTiling, overlapsToCoverage, tile1, txSeqsFromFa, windowPerGroup

Examples

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)


[Package ORFik version 1.4.0 Index]