Mercurial > repos > mingchen0919 > aurora_htseq
changeset 10:ec906e72784d draft
planemo upload commit e2f267840cded7ba17bb75a074796a4babbaab5b-dirty
author | mingchen0919 |
---|---|
date | Thu, 26 Apr 2018 12:24:33 -0400 |
parents | 578a96df8690 |
children | ce76fb2791e5 |
files | expose-outputs.sh getopt_specification.csv htseq_count.Rmd htseq_count.xml shell-script-template.sh |
diffstat | 5 files changed, 26 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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
--- 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 ]]></command> <inputs> @@ -86,8 +85,7 @@ </inputs> <outputs> <data name="report" format="html" label="${tool.name} report on ${on_string}" hidden="false"/> - <data name="count" format="txt" label="${tool.name} txt count on ${on_string}" hidden="false"/> - <data name="count_rdata" format="rdata" label="${tool.name} rdata count data on ${on_string}"/> + <data name="count" format="csv" label="${tool.name} txt count on ${on_string}" hidden="false"/> </outputs> <citations> <citation type="bibtex"><![CDATA[
--- a/shell-script-template.sh Wed Apr 25 14:22:32 2018 -0400 +++ b/shell-script-template.sh Thu Apr 26 12:24:33 2018 -0400 @@ -6,7 +6,6 @@ # build job-script.sh cat >${SHELL_SCRIPT} <<EOF -#------------ BELOW IS WHERE YOU WRITE YOUR OWN SHELL SCRIPT -------------- htseq-count \\ $(echo ${X_A} | sed 's/,/ /g') \\ @@ -21,7 +20,6 @@ grep -v '__no_feature\|__ambiguous\|__too_low_aQual\|__not_aligned\|__alignment_not_unique' htseq-counts-raw.txt > counts.txt -#------------ END OF SHELL SCRIPT ------------------------------------------ EOF # run SHELL_SCRIPT