changeset 6:4c84d748da08 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_fastq_dump commit c9517f0b061cdca3b79678d9a2620e1e43115d42-dirty
author mingchen0919
date Wed, 27 Sep 2017 11:40:38 -0400
parents a2ba5619f51b
children 2d1c5d1633bf
files fastq_dump_se.Rmd fastq_dump_se.xml fastq_dump_se_render.R
diffstat 3 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_dump_se.Rmd	Wed Sep 27 11:18:27 2017 -0400
+++ b/fastq_dump_se.Rmd	Wed Sep 27 11:40:38 2017 -0400
@@ -31,11 +31,12 @@
 # loop through SRA accessions to download and extract reads.
 for(id in sra_accessions) {
   if(FORMAT == 'fasta') {
-    command = paste0('fastq-dump --fasta ', id, ' -O read_files_directory')
+    command = paste0('fastq-dump --fasta ', '-O read_files_directory ', id)
   } else {
-    command = paste0('fastq-dump ', id, ' -O read_files_directory')
+    command = paste0('fastq-dump ', '-O read_files_directory ', id)
   }
-  system(command = command)
+  print(command)
+  #system(command = command)
 }
 ```
 
--- a/fastq_dump_se.xml	Wed Sep 27 11:18:27 2017 -0400
+++ b/fastq_dump_se.xml	Wed Sep 27 11:40:38 2017 -0400
@@ -28,7 +28,7 @@
     <command>
         <![CDATA[
             Rscript '${__tool_directory__}/fastq_dump_se_render.R'
-                -i $sra_accession
+                -i '$sra_accession'
                 -e $echo
                 -f $format
 
@@ -41,7 +41,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 (true) or fasta (false)?"/>
+        <param type="boolean" name="format" truevalue="fastq" falsevalue="fasta" checked="false" 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>
--- a/fastq_dump_se_render.R	Wed Sep 27 11:18:27 2017 -0400
+++ b/fastq_dump_se_render.R	Wed Sep 27 11:40:38 2017 -0400
@@ -62,13 +62,13 @@
     gsub('SRA_ACCESSION', opt$sra_accession, x)
   }) %>%
   (function(x) {
+    gsub('FORMAT', opt$format, x)
+  }) %>%
+  (function(x) {
     gsub('ECHO', opt$echo, x)
   }) %>%
   (function(x) {
-    gsub('FORMAT', opt$format, x)
-  }) %>%
-  (function(x) {
-    gsub('OUTPUT_DIR', opt$fastq_dump_se_dir, x)
+    gsub('OUTPUT_DIR', opt$output_dir, x)
   }) %>%
   (function(x) {
     fileConn = file('fastq_dump_se.Rmd')