Mercurial > repos > mingchen0919 > rmarkdown_fastqc_site
annotate 4_per_sequence_GC_content.Rmd @ 0:d732d4526c6d draft
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
author | mingchen0919 |
---|---|
date | Tue, 08 Aug 2017 10:14:46 -0400 |
parents | |
children |
rev | line source |
---|---|
0
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
1 --- |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
2 title: "Per Sequence GC Content" |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
3 output: html_document |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
4 --- |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
5 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
6 ```{r setup, include=FALSE, warning=FALSE, message=FALSE} |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
7 knitr::opts_chunk$set(echo = ECHO) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
8 ``` |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
9 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
10 ## Per Sequence GC Content |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
11 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
12 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
13 ```{r} |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
14 PSGC_df = data.frame() |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
15 PSGC_file_paths = read.csv('PSGC_file_paths.txt', |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
16 header = TRUE, stringsAsFactors = FALSE) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
17 for(i in 1:nrow(PSGC_file_paths)) { |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
18 # file_path = paste0('REPORT_OUTPUT_DIR/', PSGC_file_paths[i,2]) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
19 file_path = PSGC_file_paths[i,2] |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
20 psgc_df = read.csv(file_path, |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
21 sep='\t', header=TRUE, stringsAsFactors = FALSE) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
22 psgc_df$sample_id = rep(PSGC_file_paths[i,1], nrow(psgc_df)) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
23 PSGC_df = rbind(PSGC_df, psgc_df) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
24 } |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
25 ``` |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
26 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
27 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
28 ```{r} |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
29 max_phred = max(PSGC_df$Count) + 5 |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
30 hchart(PSGC_df, "line", hcaes(x = X.GC.Content, y = Count, group = sample_id)) %>% |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
31 hc_title( |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
32 text = "Per Sequence GC Content" |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
33 ) %>% |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
34 hc_xAxis( |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
35 title = list(text = "% GC") |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
36 ) %>% |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
37 hc_exporting(enabled = TRUE) |
d732d4526c6d
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastqc_site commit ddb1f6aca7619aea2e660b1729367841b56ba4c9-dirty
mingchen0919
parents:
diff
changeset
|
38 ``` |