changeset 30:231de8741468 draft

planemo upload commit 3b9f9d4505f063da01213caf39f548ea1605c2f3-dirty
author mingchen0919
date Fri, 14 Sep 2018 16:35:24 -0400
parents 24a7f1f92db7
children 7e767425bb3d
files rmarkdown_report.Rmd
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rmarkdown_report.Rmd	Fri Sep 14 14:03:11 2018 -0400
+++ b/rmarkdown_report.Rmd	Fri Sep 14 16:35:24 2018 -0400
@@ -6,12 +6,9 @@
 ---
 
 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
-knitr::opts_chunk$set(error = TRUE, echo = FALSE)
+knitr::opts_chunk$set(error = TRUE, echo = TRUE)
 ```
 
-```{r debug-chunk}
-print(1:4)
-```
 
 ```{css echo=FALSE}
 # code chunks scrollable
@@ -66,7 +63,7 @@
 coldata = read.csv(opt$X_B, row.names = 1, header = TRUE)[colnames(count_data),,drop=FALSE]
 ```
 
-```{r echo=FALSE}
+```{r}
 dds = DESeqDataSetFromMatrix(countData = count_data,
                              colData = coldata,
                              design = formula(opt$X_C))
@@ -82,7 +79,7 @@
 ```
 
 
-```{r echo=FALSE}
+```{r}
 # save all padj sorted res to tool output directory
 padj_sorted_res = res[order(res$padj), ]
 write.table(padj_sorted_res,
@@ -92,9 +89,12 @@
 # save significant genes to a file in tool output directory
 sig_res = res[(res$padj < opt$X_I) & !is.na(res$padj), ]
 sig_res_sorted = sig_res[order(sig_res$padj), ]
+sig_res_sorted$feature_id = rownames(sig_res_sorted)
+n_col = ncol(sig_res_sorted)
+sig_res_sorted = sig_res_sorted[, c(n_col, 1:(n_col - 1))]
 write.table(sig_res_sorted, 
             file = paste0(opt$X_d, '/padj-sorted-significant-genes.txt'), 
-            quote = FALSE)
+            quote = FALSE, row.names = FALSE)
 ```
 
 ## MA-plot