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 = FALSE)
coverage_indicators <- determineCoverageQuality(threshold1, threshold2,
percentage1, percentage2,
coverage_summary)
badCoverageSummary <- reportBadRegionsSummary(threshold1, threshold2,
percentage1, percentage2,
coverage_indicators, "", output)
coverage_indicators_temp <- reportBadRegionsDetailed(threshold1, threshold2,
percentage1, percentage2,
coverage_indicators, "",
samples, output)
badCoverageOverview <- reportBadRegionsGenes(threshold1, threshold2, percentage1,
percentage2, badCoverageSummary,
output)
plotSummary(threshold1, threshold2, percentage1, percentage2,
badCoverageSummary, output)
plotDetailed(threshold1, threshold2, percentage1, percentage2,
coverage_indicators_temp, output)
plotSummaryGenes(threshold1, threshold2, percentage1, percentage2,
badCoverageOverview, output)
quantiles <- c(0.5)
coverage_summary2 <- determineQuantiles(coverage_summary, quantiles, output)
Run the code above in your browser using DataLab