changeset 9:233210d44681 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit 5d2a63708a8abf73432c1d6863d970146c6a38b2-dirty
author mingchen0919
date Wed, 27 Sep 2017 16:16:12 -0400
parents 86a31717730e
children 057a6b742899
files fastq_dump_se.Rmd fastq_dump_se.xml fastq_dump_se_render.R
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_dump_se.Rmd	Wed Sep 27 14:05:42 2017 -0400
+++ b/fastq_dump_se.Rmd	Wed Sep 27 16:16:12 2017 -0400
@@ -30,7 +30,7 @@
 sra_accessions = sra_accessions[sra_accessions != '']
 # loop through SRA accessions to download and extract reads.
 for(id in sra_accessions) {
-  if(FORMAT == 'fasta') {
+  if('FORMAT' == 'fasta') {
     command = paste0('fastq-dump --fasta ', '-O read_files_directory ', id)
   } else {
     command = paste0('fastq-dump ', '-O read_files_directory ', id)
--- a/fastq_dump_se.xml	Wed Sep 27 14:05:42 2017 -0400
+++ b/fastq_dump_se.xml	Wed Sep 27 16:16:12 2017 -0400
@@ -34,7 +34,7 @@
 
                 -r $report
                 -d $report.files_path
-                -s $sink_output
+                -s $sink_message
 
                 -t '${__tool_directory__}/fastq_dump_se.Rmd'
         ]]>
@@ -42,7 +42,7 @@
     <inputs>
         <param type="text" name="sra_accession" label="SRR/DRR/ERR accessions"
                help="A list of SRR/DRR/ERR accessions separated by comma or space. e.g. SRR6077558,ERR343809"/>
-        <param type="boolean" name="format" truevalue="fastq" falsevalue="fasta" checked="false" label="output files in fastq (Yes) or fasta (No)?"/>
+        <param type="boolean" name="format" truevalue="fastq" falsevalue="fasta" checked="true" label="output files in fastq (Yes) or fasta (No)?"/>
         <param type="boolean" name="echo" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Display analysis code in report?" />
     </inputs>
     <outputs>
@@ -50,6 +50,6 @@
         <collection type="list" name="list_collection">
             <discover_datasets pattern="__name_and_ext__" directory="read_files_directory" />
         </collection>
-        <data format="txt" name="sink_output" label="sink output" from_work_dir="sink_output.txt" />
+        <data format="txt" name="sink_message" label="Warnings and Errors" from_work_dir="warnings_and_errors.txt" />
     </outputs>
 </tool>
\ No newline at end of file
--- a/fastq_dump_se_render.R	Wed Sep 27 14:05:42 2017 -0400
+++ b/fastq_dump_se_render.R	Wed Sep 27 16:16:12 2017 -0400
@@ -20,8 +20,10 @@
   library(tools)
 })
 
-#/////////////////////// SINK OUTPUTS TO A FILE FOR DEBUGGING ///////////
-sink('sink_output.txt')
+#/////////////////////// SINK WARNINGS AND ERRORS TO A FILE FOR DEBUGGING ///////////
+zz = file('warnings_and_errors.txt')
+sink(zz)
+sink(zz, type = 'message')
 
 # column 1: the long flag name
 # column 2: the short flag alias. A SINGLE character string