collapseDuplicatedReads: Collapse duplicated reads

collapseDuplicatedReadsR Documentation

Collapse duplicated reads

Description

For every GRanges, GAlignments read, with the same: seqname, start, (cigar) / width and strand, collapse and give a new meta column called "score", which contains the number of duplicates of that read. If score column already exists, will return input object!

Usage

collapseDuplicatedReads(x, addScoreColumn = TRUE, ...)

Arguments

x

a GRanges, GAlignments or GAlignmentPairs object

addScoreColumn

logical, default: (TRUE), if FALSE, only collapse and not keep score column of counts for collapsed reads. Returns directly without collapsing if reuse.score.column is FALSE and score is already defined.

...

alternative arguments for class instances. For example, see: ?'collapseDuplicatedReads,GRanges-method'

Value

a GRanges, GAlignments, GAlignmentPairs or data.table object, same as input

Examples

gr <- rep(GRanges("chr1", 1:10,"+"), 2)
collapseDuplicatedReads(gr)

Roleren/ORFik documentation built on Nov. 13, 2024, 10 p.m.