determineRegionsOfInterest serves to select the coverage information (including the coverage of all samples and - depending on the input object - their assigned quality value) of one or more subsets of regions.
Data frame- or GRanges object containing the regions of interest (if data frame: chromosome: first column, start position: second column and end position: third column).
List object, return value of function
Every chromosome is analyzed individually. For every base defined in
regionsOfInterest the previously determined coverage information is written out. The function thereby serves to select special subsets of regions, e.g. targeted and untargeted regions when using
TRonly=FALSE in the first place or particular targeted regions when using
It is not recommended to use
TRonly=TRUE, but to select regions off target using
determineRegionsOfInterest. In this case, no coverage will be registered for all bases off target, as this information was not saved during the step of
regionsOfInterest is identical compared to
targetRegions and the function
TRonly=TRUE has been used in the first place, the selection of regions that is returned is not changed at all.
A list is returned. Every component contains the coverage information of one chromosomeas as a GRanges object. The metadata columns contain information on the concrete coverage of each sample at a specific position. Furthermore, the column 'TargetBases' contains information on whether the considered region or position contains target bases (value 1) or not (value 0). The column 'indicator' contains information on the coverage quality of the corresponding region/position (0: bad region off target; 1: bad region on target; 2: acceptable region off target; 3: acceptable region on target; 4: good region off target; 5: good region on target).
If a chromosome has not been targeted and/or not covered by any sample, but defined in
regionsOfInterest, the component is "NA".
Sarah Sandmann <email@example.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
threshold1 <- 20 threshold2 <- 100 percentage1 <- 0.80 percentage2 <- 0.90 sample_file <- system.file("extdata", "SampleNames.txt", package = "BadRegionFinder") samples <- read.table(sample_file) bam_input <- system.file("extdata", package = "BadRegionFinder") output <- system.file("extdata", package = "BadRegionFinder") target_regions <- system.file("extdata", "targetRegions.bed", package = "BadRegionFinder") targetRegions <- read.table(target_regions, header = FALSE, stringsAsFactors = FALSE) coverage_summary <- determineCoverage(samples, bam_input, targetRegions, output, TRonly = FALSE) coverage_indicators <- determineCoverageQuality(threshold1, threshold2, percentage1, percentage2, coverage_summary) coverage_indicators_2 <- determineRegionsOfInterest(targetRegions, coverage_indicators)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.