diff 01_htseq_count_analysis.Rmd @ 5:cf3fde5d0834 draft

planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b-dirty
author mingchen0919
date Tue, 01 May 2018 11:27:32 -0400
parents
children a40d5db8687e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/01_htseq_count_analysis.Rmd	Tue May 01 11:27:32 2018 -0400
@@ -0,0 +1,36 @@
+---
+title: 'HTSeq-count Analysis'
+output:
+    html_document:
+      highlight: pygments
+---
+
+## Job script
+
+```{bash, echo=FALSE}
+sh ${TOOL_INSTALL_DIR}/build-and-run-job-scripts.sh
+```
+
+```{r echo=FALSE, comment='', results='asis'}
+cat('```bash\n')
+cat(readLines(paste0(Sys.getenv('REPORT_FILES_PATH'), '/htseq-count.sh')), sep = '\n')
+cat('\n```')
+```
+
+## Counts
+
+Only the first few rows are displayed. 
+
+```{r, echo=FALSE}
+count_data = read.table(paste0(opt$X_d, '/counts.txt'), row.names = 1)
+sample_names = trimws(strsplit(opt$X_B, ',')[[1]])
+colnames(count_data) = rep(sample_names, length = ncol(count_data))
+kable(head(count_data))
+
+# modify column names
+count_data = data.frame(feature_id = rownames(count_data), count_data)
+write.csv(count_data, 
+          file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/count_data.csv'),
+          quote = FALSE, row.names = FALSE)
+```
+