Target capture specificity
Calculates the fraction of reads that align to target regions. Can also be used to retrieve those reads mapping to targets.
FALSE, just the fraction of reads / read pairs mapping to targets is returned.
reads contains all single reads (i.e. is output of
get.reads), this is the number of target-overlapping reads,
divided by the number of all single reads. When
reads contains read pairs (i.e. is output of
it is the number of read pairs with at least one target-overlapping read, divided by the
number of read pairs (= half the number of reads). In case of small targets and large insert sizes
the two reads of a pair could be located on both sides of the target without overlap, respectively.
Still, the read pair will be counted as on-target, since the corresponding DNA molecule was covering the target.
TRUE, a list is returned with elements
fraction of reads / read pairs mapping to targets
With the output from
the 'enrichment' of the target capture experiment can be calculated as
'fraction of on-target reads / fraction of target within genome'
Manuela Hummel email@example.com
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) ## fraction of on-target reads fraction.reads.target(reads, targets)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.