Previous changeset 17:ac5c618e4d97 (2017-11-06) Next changeset 19:8c79e5b7cfc0 (2017-11-09) |
Commit message:
add boxplot for per base sequence quality |
modified:
fastqc_report.Rmd fastqc_report.xml |
b |
diff -r ac5c618e4d97 -r 8635a4cee6dd fastqc_report.Rmd --- a/fastqc_report.Rmd Mon Nov 06 16:53:14 2017 -0500 +++ b/fastqc_report.Rmd Thu Nov 09 09:22:09 2017 -0500 |
b |
@@ -139,28 +139,33 @@ ## reads 1 pbsq_1 = extract_data_module('REPORT_DIR/reads_1_fastqc_data.txt', 'Per base sequence quality') pbsq_1$id = 1:length(pbsq_1$X.Base) - -melt_pbsq_1 = filter(melt(pbsq_1, id=c('X.Base', 'id')), variable == 'Mean') -melt_pbsq_1$trim = 'before' - +pbsq_1$trim = 'before' ## reads 2 pbsq_2 = extract_data_module('REPORT_DIR/reads_2_fastqc_data.txt', 'Per base sequence quality') pbsq_2$id = 1:length(pbsq_2$X.Base) +pbsq_2$trim = 'after' -melt_pbsq_2 = filter(melt(pbsq_2, id=c('X.Base', 'id')), variable == 'Mean') -melt_pbsq_2$trim = 'after' - -comb_pbsq = rbind(melt_pbsq_1, melt_pbsq_2) +comb_pbsq = rbind(pbsq_1, pbsq_2) comb_pbsq$trim = factor(levels = c('before', 'after'), comb_pbsq$trim) p = ggplot(data = comb_pbsq) + - geom_line(mapping = aes(x = id, y = value, group = variable, color = variable)) + - scale_x_continuous(breaks = pbsq_2$id, labels = pbsq_2$X.Base) + - facet_grid(. ~ trim) + - ylim(0, max(comb_pbsq$value) + 5) + + geom_boxplot(mapping = aes(x = id, + lower = Lower.Quartile, + upper = Upper.Quartile, + middle = Median, + ymin = X10th.Percentile, + ymax = X90th.Percentile, + fill = "yellow"), + stat = 'identity') + + geom_line(mapping = aes(x = id, y = Mean, color = "red")) + + scale_x_continuous(breaks = pbsq_2$id, labels = pbsq_2$X.Base) + + scale_fill_identity() + + scale_color_identity() + + ylim(0, max(comb_pbsq$Upper.Quartile) + 5) + + facet_grid(. ~ trim) + theme(axis.text.x = element_text(angle=45)) -ggplotly(p) +p ``` |
b |
diff -r ac5c618e4d97 -r 8635a4cee6dd fastqc_report.xml --- a/fastqc_report.xml Mon Nov 06 16:53:14 2017 -0500 +++ b/fastqc_report.xml Thu Nov 09 09:22:09 2017 -0500 |
b |
@@ -5,16 +5,13 @@ </description> <requirements> <requirement type="package" version="1.15.0.6-0">pandoc</requirement> - <requirement type="package" version="1.14.1">bioconductor-deseq2</requirement> <requirement type="package" version="1.20.0">r-getopt</requirement> <requirement type="package" version="1.3">r-rmarkdown</requirement> <requirement type="package" version="1.8.4">r-plyr</requirement> <requirement type="package" version="1.1.0">r-stringr</requirement> - <requirement type="package" version="0.5.0">r-highcharter</requirement> <requirement type="package" version="0.2">r-dt</requirement> <requirement type="package" version="1.4.2">r-reshape2</requirement> <requirement type="package" version="4.5.6">r-plotly</requirement> - <requirement type="package" version="0.2.0.1">r-formattable</requirement> <requirement type="package" version="0.3.5">r-htmltools</requirement> <requirement type="package" version="0.11.5">fastqc</requirement> </requirements> |