view 06_per_sequence_gc_content.Rmd @ 12:68ea2ebbf866 draft

add boxplot for per base sequence quality
author mingchen0919
date Thu, 09 Nov 2017 09:23:43 -0500
parents 507eec497730
children
line wrap: on
line source

---
title: 'Per sequence GC content'
output:
    html_document:
      number_sections: true
      toc: true
      theme: cosmo
      highlight: tango
---

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

### Per sequence GC content

```{r 'Per sequence GC content', fig.width=10}
## reads 1
psGCc_1 = extract_data_module('REPORT_DIR/reads_1_fastqc_data.txt', 'Per sequence GC content')
psGCc_1$trim = 'before'

## reads 2
psGCc_2 = extract_data_module('REPORT_DIR/reads_2_fastqc_data.txt', 'Per sequence GC content')
psGCc_2$trim = 'after'

comb_psGCc = rbind(psGCc_1, psGCc_2)
comb_psGCc$trim = factor(levels = c('before', 'after'), comb_psGCc$trim)

p = ggplot(data = comb_psGCc, aes(x = X.GC.Content, y = Count)) +
  geom_line(color = 'red') +
  facet_grid(. ~ trim) +
  xlab('Mean Sequence Qaulity (Phred Score)') +
  ylab('')
ggplotly(p)
```