diff 03_per_tile_sequence_quality.Rmd @ 2:c64267b9f754 draft default tip

planemo upload commit 841d8b22bf9f1aaed6bfe8344b60617f45b275b2-dirty
author mingchen0919
date Sun, 30 Dec 2018 12:48:14 -0500
parents b7c115edd970
children
line wrap: on
line diff
--- a/03_per_tile_sequence_quality.Rmd	Tue Feb 27 10:40:20 2018 -0500
+++ b/03_per_tile_sequence_quality.Rmd	Sun Dec 30 12:48:14 2018 -0500
@@ -3,14 +3,11 @@
 ---
 
 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
-knitr::opts_chunk$set(
-  echo = as.logical(opt$X_e),
-  error = TRUE,
-  eval = TRUE
-)
+knitr::opts_knit$set(progress = FALSE)
+knitr::opts_chunk$set(error = TRUE, echo = FALSE)
 ```
 
-# Per tile sequence quality
+### Per tile sequence quality
 
 ```{r 'per tile sequence quality', fig.width=10}
 ## check if 'per tile sequence quality' module exits or not
@@ -29,16 +26,19 @@
   comb_ptsq$Base = factor(levels = unique(comb_ptsq$Base), comb_ptsq$Base)
   
   # convert integers to charaters
-  comb_ptsq$Tile = as.character(comb_ptsq$X.Tile)
+  # comb_ptsq$Tile = as.character(comb_ptsq$X.Tile)
   
-  p = ggplot(data = comb_ptsq, aes(x = Base, y = Tile, fill = Mean)) +
-    geom_raster() + 
+  p = ggplot(data = comb_ptsq) +
+    geom_raster(mapping = aes(x = Base, y = X.Tile, fill = Mean)) + 
     facet_grid(. ~ trim) + 
-    xlab('Position in read (bp)') + 
-    ylab('') +
-    theme(axis.text.x = element_text(angle=45))
+    scale_x_discrete(name = "Position in read (bp)") +
+    scale_y_continuous(name = "") +
+    scale_fill_gradient(low = "blue", high = "red") +
+    theme(axis.text.x = element_text(size = 5, angle = 90),
+          axis.text.y = element_text(size = 5),
+        panel.background = element_rect(fill = NA))
   ggplotly(p)
 } else {
   print('No "per tile sequence quality" data')
 }
-```
\ No newline at end of file
+```