Learn R Programming

TEQC (version 3.12.0)

readsPerTarget: Numbers of reads per target

Description

Counts the numbers of reads overlapping each target region

Usage

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

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

See Also

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

Examples

Run this code
## 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)

Run the code above in your browser using DataLab