plotSummaryGenes {BadRegionFinder} | R Documentation |
The function plotSummaryGenes
provides a possibility to visualize the output of reportBadRegionsGenes
. A barplot is returned, visualizing the percent of each gene that falls into each category of coverage quality. The plot thereby serves to quickly distinguish well from bad covered genes.
plotSummaryGenes(threshold1, threshold2, percentage1, percentage2, badCoverageGenes, output)
threshold1 |
Integer, threshold defining the number of reads that have to be registered for a sample that its coverage is classified as acceptable. |
threshold2 |
Integer, threshold defining the number of reads that have to be registered for a sample that its coverage is classified as good. |
percentage1 |
Float, defining the percentage of samples that have to feature a coverage of at least |
percentage2 |
Float, defining the percentage of samples that have to feature a coverage of at least |
badCoverageGenes |
Data frame object, return value of function |
output |
The folder to write the output file into. If this argument is an empty string, the plot is printed on the screen. |
The function plotSummaryGenes
serves to summarize the previously determined coverage quality in a visual way concerning the genes only.
For every gene either one or two stacked bars are plotted. If a gene is covered, but it was not originally targeted, a bar is plotted containing the following color code: black - bad region off target; dark gray - acceptable region off target; light gray - good region off target. If a gene was originally targeted, a bar is plotted containing the following color code: red - bad region on target; yellow - acceptable region on target; green - good region on target.
No value is returned.
Sarah Sandmann <sarah.sandmann@uni-muenster.de>
BadRegionFinder
, determineCoverage
, determineCoverageQuality
, determineRegionsOfInterest
, reportBadRegionsSummary
, reportBadRegionsDetailed
, reportBadRegionsGenes
, plotSummary
, plotDetailed
, determineQuantiles
library("BSgenome.Hsapiens.UCSC.hg19") 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 = TRUE) coverage_indicators <- determineCoverageQuality(threshold1, threshold2, percentage1, percentage2, coverage_summary) badCoverageSummary <- reportBadRegionsSummary(threshold1, threshold2, percentage1, percentage2, coverage_indicators, "", output) badCoverageGenes <- reportBadRegionsGenes(threshold1, threshold2, percentage1, percentage2, badCoverageSummary, output) plotSummaryGenes(threshold1, threshold2, percentage1, percentage2, badCoverageGenes, output)