annotate 06_per_sequence_gc_content.Rmd @ 0:b7c115edd970 draft

planemo upload
author mingchen0919
date Tue, 27 Feb 2018 10:37:12 -0500
parents
children c64267b9f754
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
1 ---
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
2 output: html_document
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
3 ---
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
4
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
5 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
6 knitr::opts_chunk$set(
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
7 echo = as.logical(opt$X_e),
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
8 error = TRUE,
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
9 eval = TRUE
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
10 )
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
11 ```
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
12
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
13 # Per sequence GC content
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
14
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
15 ```{r 'Per sequence GC content', fig.width=10}
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
16 ## reads 1
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
17 psGCc_1 = extract_data_module(paste0(opt$X_d, '/read_1_fastqc/fastqc_data.txt'), 'Per sequence GC content')
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
18 psGCc_1$trim = 'before'
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
19
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
20 ## reads 2
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
21 psGCc_2 = extract_data_module(paste0(opt$X_d, '/read_2_fastqc/fastqc_data.txt'), 'Per sequence GC content')
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
22 psGCc_2$trim = 'after'
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
23
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
24 comb_psGCc = rbind(psGCc_1, psGCc_2)
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
25 comb_psGCc$trim = factor(levels = c('before', 'after'), comb_psGCc$trim)
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
26
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
27 p = ggplot(data = comb_psGCc, aes(x = X.GC.Content, y = Count)) +
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
28 geom_line(color = 'red') +
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
29 facet_grid(. ~ trim) +
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
30 xlab('Mean Sequence Qaulity (Phred Score)') +
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
31 ylab('')
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
32 ggplotly(p)
b7c115edd970 planemo upload
mingchen0919
parents:
diff changeset
33 ```