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

cont. chipseq qc

parent 55df576d
No related branches found
No related tags found
No related merge requests found
...@@ -49,24 +49,31 @@ scale_fill_discrete <- function (...){ scale_color_brewer(..., type = "seq", pal ...@@ -49,24 +49,31 @@ scale_fill_discrete <- function (...){ scale_color_brewer(..., type = "seq", pal
#+ fig.height=nrow(algnSummary) #+ fig.height=nrow(algnSummary)
ggplot(algnSummary, aes(condition, mapping_efficiency)) + ggplot(algnSummary, aes(condition, mapping_efficiency)) +
geom_bar(stat="identity") + geom_bar(stat="identity") +
coord_flip() +
ylim(0,100) + ylim(0,100) +
coord_flip() +
ggtitle("mapping efficiency") ggtitle("mapping efficiency")
ggplot(algnSummary, aes(condition, num_reads)) + ggplot(algnSummary, aes(condition, num_reads)) +
geom_bar(stat="identity") + geom_bar(stat="identity") +
coord_flip() + coord_flip() +
ggtitle("read counts") +scale_y_continuous(labels=comma) ggtitle("read counts") +
scale_y_continuous(labels=comma)
ggplot(algnSummary, aes(condition, unique_mapper_prop)) + ggplot(algnSummary, aes(condition, unique_mapper_prop)) +
geom_bar(stat="identity") + coord_flip() + geom_bar(stat="identity") +
coord_flip() +
ggtitle("unique-mapper proportions") + ggtitle("unique-mapper proportions") +
scale_y_continuous(labels=comma) scale_y_continuous(labels=percent) +
ylim(0,100)
ggplot(algnSummary, aes(condition, multi_mappers_prop)) + ggplot(algnSummary, aes(condition, multi_mappers_prop)) +
geom_bar(stat="identity") + coord_flip() + geom_bar(stat="identity") +
coord_flip() +
ggtitle("multi-mapper proportions") + ggtitle("multi-mapper proportions") +
scale_y_continuous(labels=comma) scale_y_continuous(labels=percent) +
ylim(0,100)
#> ## Bam Correlation #> ## Bam Correlation
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
source <(curl https://dl.dropboxusercontent.com/u/113630701/datautils/bash/lsf_utils.sh 2>&1 2>/dev/null) source <(curl https://dl.dropboxusercontent.com/u/113630701/datautils/bash/lsf_utils.sh 2>&1 2>/dev/null)
## enable snippet spinning ## enable snippet spinning
source <(curl https://dl.dropboxusercontent.com/u/113630701/datautils/R/utils/spinr.sh 2>&1 2>/dev/null) source <(curl https://raw.githubusercontent.com/holgerbrandl/datautils/master/R/spinr/spin_utils.sh 2>&1 2>/dev/null)
## define common binaries ## define common binaries
export PATH=/projects/bioinfo/holger/bin/bowtie2-2.2.2:$PATH export PATH=/projects/bioinfo/holger/bin/bowtie2-2.2.2:$PATH
......
...@@ -52,7 +52,7 @@ readCount <- function(statsFile){ ...@@ -52,7 +52,7 @@ readCount <- function(statsFile){
readCounts <- fastqDataFiles %>% ldply(readCount) # %>% print_head() readCounts <- fastqDataFiles %>% ldply(readCount) # %>% print_head()
require.auto(scales) require.auto(scales)
#+ fig.width=12, fig.height=round(nrow(readCounts)/3) #+ fig.width=12, fig.height=round(nrow(readCounts)/2)
ggplot(readCounts, aes(run, num_reads)) + geom_bar(stat="identity") + coord_flip() + scale_y_continuous(labels=comma) + ggtitle("read counts") ggplot(readCounts, aes(run, num_reads)) + geom_bar(stat="identity") + coord_flip() + scale_y_continuous(labels=comma) + ggtitle("read counts")
# #+ results='asis' # #+ results='asis'
...@@ -75,7 +75,7 @@ readSummary <- function(statsFile){ ...@@ -75,7 +75,7 @@ readSummary <- function(statsFile){
qcSummary <- fastqDataFiles %>% ldply(readSummary) qcSummary <- fastqDataFiles %>% ldply(readSummary)
#' # Base Quality Distribution Summary #' # Base Quality Distribution Summary
#+ fig.height=2+round(nrow(readCounts)/3), fig.width=12 #+ fig.height=2+round(nrow(readCounts)/2), fig.width=12
qcSummary %>% ggplot(aes(score, run, fill=tolower(flag))) + qcSummary %>% ggplot(aes(score, run, fill=tolower(flag))) +
geom_tile() + geom_tile() +
rotXlab() + rotXlab() +
...@@ -94,7 +94,7 @@ dupLevels <- fastqDataFiles %>% ldply(function(statsFile){ ...@@ -94,7 +94,7 @@ dupLevels <- fastqDataFiles %>% ldply(function(statsFile){
}) })
require.auto(scales) require.auto(scales)
#+ fig.width=12, fig.height=round(nrow(dupLevels)/3) #+ fig.width=12, fig.height=round(nrow(dupLevels)/2)
ggplot(dupLevels, aes(run, dedup_proportion)) + geom_bar(stat="identity") + coord_flip() + scale_y_continuous(labels=percent) + ggtitle("unique_reads/total_reads") + ylim(0,1) ggplot(dupLevels, aes(run, dedup_proportion)) + geom_bar(stat="identity") + coord_flip() + scale_y_continuous(labels=percent) + ggtitle("unique_reads/total_reads") + ylim(0,1)
...@@ -133,7 +133,7 @@ baseQualities %>% ggplot(aes(reorder(Base, base_order), Mean, group=run, color=r ...@@ -133,7 +133,7 @@ baseQualities %>% ggplot(aes(reorder(Base, base_order), Mean, group=run, color=r
runs <- with(baseQualities, as.data.frame(table(run))) runs <- with(baseQualities, as.data.frame(table(run)))
#+ warning=FALSE, fig.width=15, fig.height=3*ceiling(nrow(runs)/3) #+ warning=FALSE, fig.width=15, fig.height=3*ceiling(nrow(runs)/2)
## http://stackoverflow.com/questions/12518387/can-i-create-an-empty-ggplot2-plot-in-r ## http://stackoverflow.com/questions/12518387/can-i-create-an-empty-ggplot2-plot-in-r
baseQualities %>% baseQualities %>%
......
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