Fraction of the target within the genome

Share:

Description

Calculates the fraction of the reference genome that is targeted

Usage

1
fraction.target(targets, Offset = 0, genome = c(NA, "hg19", "hg18"), genomesize)

Arguments

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

genome

genome version targets were designed and reads aligned to. For the given options the total genome size is set automatically. For other genomes or versions, leave this option empty ('NA') and specify the genome size with option 'genomesize'

genomesize

integer: specify the total genome size manually. If 'genomesize' is given, option 'genome' will be ignored.

Value

Returns the fraction of nucleotides within the genome that were targeted.

Note

With the output from fraction.target and fraction.reads.target the 'enrichment' of the target capture experiment can be calculated as 'fraction of on-target reads / fraction of target within genome'

Author(s)

Manuela Hummel m.hummel@dkfz.de

See Also

fraction.reads.target, get.targets

Examples

1
2
3
4
exptPath <- system.file("extdata", package="TEQC")
targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed")
targets <- get.targets(targetsfile, skip=0)
fraction.target(targets, genome="hg19")