Skip to content
Snippets Groups Projects
Commit d01e2201 authored by Holger Brandl's avatar Holger Brandl
Browse files

cont with qc reporting

parent c3a30ec4
No related branches found
No related tags found
No related merge requests found
#' # Read Summary Report
#+ echo=FALSE, message=FALSE
##+ echo=FALSE, message=FALSE
## Note This script is supposed to be knitr::spin'ed
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/core_commons.R")
devtools::source_url("https://dl.dropboxusercontent.com/u/113630701/datautils/R/ggplot_commons.R")
argv = commandArgs(TRUE)
if(str_detect(argv[1], "fastqc_summary")) argv <- argv[-1]
if(length(argv) != 1){
stop("Usage: fastqc_summmary.R <directory with fastqc results>")
echo
}
#baseDir="fastqc"
#baseDir="/Volumes/projects/bioinfo/holger/projects/helin/mouse/fastqc"
baseDir=argv[1]
echo("working dir is data in", getwd())
echo("processing data in", baseDir)
fastqDataFiles <- list.files(path=baseDir, pattern="^fastqc_data.txt", full.names=TRUE, recursive=T)
#echo("files are", fastqDataFiles)
#' ## Number of reads per run
......@@ -27,7 +39,7 @@ readCount <- function(statsFile){
)
}
readCounts <- fastqDataFiles %>% ldply(readCount)
readCounts <- fastqDataFiles %>% ldply(readCount) %>% print_head()
require.auto(scales)
ggplot(readCounts, aes(run, num_reads)) + geom_bar(stat="identity") + coord_flip() + scale_y_continuous(labels=comma)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment