---
title: "Per Sequence GC Content"
output: html_document
---

```{r setup, include=FALSE, warning=FALSE, message=FALSE}
knitr::opts_chunk$set(echo = ECHO)
```

## Per Sequence GC Content


```{r}
PSGC_df = data.frame()
PSGC_file_paths = read.csv('PSGC_file_paths.txt', 
                           header = TRUE, stringsAsFactors = FALSE)
for(i in 1:nrow(PSGC_file_paths)) {
  # file_path = paste0('REPORT_OUTPUT_DIR/', PSGC_file_paths[i,2])
  file_path = PSGC_file_paths[i,2]
  psgc_df = read.csv(file_path,
                     sep='\t', header=TRUE, stringsAsFactors = FALSE) 
  psgc_df$sample_id = rep(PSGC_file_paths[i,1], nrow(psgc_df))
  PSGC_df = rbind(PSGC_df, psgc_df)
}
```


```{r}
max_phred = max(PSGC_df$Count) + 5
hchart(PSGC_df, "line", hcaes(x = X.GC.Content, y = Count, group = sample_id)) %>%
  hc_title(
    text = "Per Sequence GC Content"
  ) %>%
  hc_xAxis(
    title = list(text = "% GC")
  ) %>%
  hc_exporting(enabled = TRUE)
```
