comparison 4_per_sequence_GC_content.Rmd @ 7:d820be692d74 draft

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