| readsPerTarget {TEQC} | R Documentation |
Counts the numbers of reads overlapping each target region
readsPerTarget(reads, targets, Offset = 0)
reads |
|
targets |
|
Offset |
integer; add |
The input RangedData table targets with an additional 'values'
column containing numbers of reads overlapping each target
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.
Manuela Hummel m.hummel@dkfz.de
coverage.target, fraction.reads.target, covered.k, coverage.hist,
coverage.uniformity, coverage.plot, coverage.targetlength.plot
## 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)