comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:d732d4526c6d
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 ```