readsPerTarget: Numbers of reads per target

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/readsPerTarget.R

Description

Counts the numbers of reads overlapping each target region

Usage

1
readsPerTarget(reads, targets, Offset = 0)

Arguments

reads

RangedData table containing positions of sequenced reads, i.e. output from get.reads

targets

RangedData table containing positions of target regions, i.e. output from get.targets

Offset

integer; add Offset bases on both sides to targeted regions and potentially collapse resulting overlapping target regions

Value

The input RangedData table targets with an additional 'values' column containing numbers of reads overlapping each target

Note

As reads input also the mappingReads output of function fraction.reads.target can be used to speed up calculation. In this case, make sure that targets and Offset parameters were the same in fraction.reads.target as then specified in readsPerTarget.

Author(s)

Manuela Hummel m.hummel@dkfz.de

See Also

coverage.target, fraction.reads.target, covered.k, coverage.hist, coverage.uniformity, coverage.plot, coverage.targetlength.plot

Examples

1
2
3
4
5
6
7
8
9
## get reads and targets
exptPath <- system.file("extdata", package="TEQC")
readsfile <- file.path(exptPath, "ExampleSet_Reads.bed")
reads <- get.reads(readsfile, idcol=4, skip=0)
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")
targets <- get.targets(targetsfile, skip=0)

## number of reads per target
readsPerTarget(reads, targets)

hummelma/TEQC documentation built on March 22, 2021, 9:45 a.m.