# HG changeset patch
# User mingchen0919
# Date 1524759873 14400
# Node ID ec906e72784d81161a8aa6d28ce18500c4e26e70
# Parent 578a96df86908527a6b736f9535f04e8c56a3c21
planemo upload commit e2f267840cded7ba17bb75a074796a4babbaab5b-dirty
diff -r 578a96df8690 -r ec906e72784d expose-outputs.sh
--- a/expose-outputs.sh Wed Apr 25 14:22:32 2018 -0400
+++ b/expose-outputs.sh Thu Apr 26 12:24:33 2018 -0400
@@ -3,5 +3,4 @@
# copy files to corresponding tool output paths.
cp htseq_count.html ${REPORT}
-cp counts.RData ${X_O}
-cp counts.txt ${X_c}
\ No newline at end of file
+cp count_data.csv ${X_c}
\ No newline at end of file
diff -r 578a96df8690 -r ec906e72784d getopt_specification.csv
--- a/getopt_specification.csv Wed Apr 25 14:22:32 2018 -0400
+++ b/getopt_specification.csv Thu Apr 26 12:24:33 2018 -0400
@@ -12,4 +12,3 @@
i,1,character,idattr
m,1,character,mode
c,1,character,count
-O,1,character,count_rdata
\ No newline at end of file
diff -r 578a96df8690 -r ec906e72784d htseq_count.Rmd
--- a/htseq_count.Rmd Wed Apr 25 14:22:32 2018 -0400
+++ b/htseq_count.Rmd Thu Apr 26 12:24:33 2018 -0400
@@ -1,10 +1,20 @@
---
-title: 'htseq-count analysis'
+title: 'htseq-count analysis report'
output:
html_document:
highlight: pygments
---
+```{css echo=FALSE}
+# code chunks scrollable
+pre code, pre, code {
+ white-space: pre !important;
+ overflow-x: scroll !important;
+ word-break: keep-all !important;
+ word-wrap: initial !important;
+}
+```
+
```{r setup, include=FALSE, warning=FALSE, message=FALSE}
knitr::opts_knit$set(progress = FALSE)
knitr::opts_chunk$set(error = TRUE, echo = FALSE)
@@ -44,26 +54,33 @@
## Job script
-* htseq-count analysis: [htseq-count.sh](htseq-count.sh)
-
```{bash, echo=FALSE}
sh ${TOOL_INSTALL_DIR}/shell-script-template.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)
```
-```{r, echo=FALSE}
-# save count data as an R object
-save(count_data, file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/counts.RData'))
-```
-----------------------------------------
## Output
diff -r 578a96df8690 -r ec906e72784d htseq_count.xml
--- a/htseq_count.xml Wed Apr 25 14:22:32 2018 -0400
+++ b/htseq_count.xml Thu Apr 26 12:24:33 2018 -0400
@@ -42,7 +42,6 @@
-i $idattr
-m $mode
-c $count
- -O $count_rdata
]]>
@@ -86,8 +85,7 @@
-
-
+
${SHELL_SCRIPT} < counts.txt
-#------------ END OF SHELL SCRIPT ------------------------------------------
EOF
# run SHELL_SCRIPT