diff tools/spades_2_5/spades.xml @ 2:b5ce24f34dd7 draft

Uploaded
author lionelguy
date Thu, 05 Sep 2013 07:43:48 -0400
parents 0f8b2da62d7d
children d82f18c76309
line wrap: on
line diff
--- a/tools/spades_2_5/spades.xml	Mon Aug 19 09:06:17 2013 -0400
+++ b/tools/spades_2_5/spades.xml	Thu Sep 05 07:43:48 2013 -0400
@@ -1,4 +1,4 @@
-<tool id="spades" name="spades" version="0.4">
+<tool id="spades" name="spades" version="0.5">
   <description>SPAdes genome assembler for regular and single-cell projects</description>
   <requirements>
     <requirement type="package" version="2.5.0">spades</requirement>
@@ -11,70 +11,79 @@
      $out_log 
     ## A real command looks like: spades.py -k 21,33,55,77,99,127 --careful -1 Y.fastq.gz -2 X.fastq.gz -t 24 -o output
     spades.py
-    ## TODO: kmers, threads, other options (-sc for single-cell)
-    #if $sc == "true":
-      --sc 
-    #end if
-    #if $careful == "true":
-      --careful 
-    #end if
-    #if $rectangle == "true" 
-      --rectangle 
-    #end if 
+    $sc
+    $onlyassembler
+    $careful
+    $rectangle
     -t $threads 
     -k $kmers 
     -i $iterations 
     ##--phred-offset
     ## Sequence files
-    #for $i, $s in enumerate( $reads )
-      #if $s.read_type.type == "pairedend"
-      -1 $s.read_type.fwd_reads
-      -2 $s.read_type.rev_reads
-      #elif $s.read_type.type == "interleaved"
-      --12 $s.read_type.interleaved_reads
-      #elif $s.read_type.type == "unpaired"
-      -s $s.read_type.unpaired_reads
+    #for $i, $library in enumerate( $libraries )
+      #set num=$i+1
+      #if str( $library.lib_type ) == "paired_end":
+        #set prefix = 'pe'
+      #else:
+        #set prefix = 'mp'
       #end if
+      --$prefix$num-$library.orientation    
+      #for $file in $library.files
+	#if $file.file_type.type == "separate"
+          --$prefix$num-1 $file.file_type.fwd_reads
+          --$prefix$num-2 $file.file_type.rev_reads
+        #elif $file.file_type.type == "interleaved"
+          --$prefix$num-12 $file.file_type.interleaved_reads
+        #elif $file.file_type.type == "unpaired"
+          --$prefix$num-s $file.file_type.unpaired_reads
+        #end if
+      #end for
     #end for
   </command>
   <inputs>
-    <param name="sc" type="select" label="Single-cell?" help="This flag is required for MDA (single-cell) data.">
+    <param name="sc" type="boolean" truevalue="--sc" falsevalue="" label="Single-cell?" help="This option is required for MDA (single-cell) data.">
       <option value="false">No</option>
       <option value="true">Yes</option>
     </param>
-    <param name="careful" type="select" label="Careful correction?" help="Tries to reduce number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses BWA tool (comes with SPAdes).">
-      <option value="false">No</option>
-      <option value="true" selected="true">Yes</option>
-    </param>
-    <param name="rectangle" type="select" label="Use rectangle correction for repeat resolution?" help="Uses rectangle graph algorithm for repeat resolution stage instead of usual SPAdes repeat resolution module (experimental).">
-      <option value="false" selected="true">No</option>
-      <option value="true">Yes</option>
-    </param>
+    <param name="onlyassembler" type="boolean" truevalue="--only-assembler" falsevalue="" checked="False" label="Run only assembly? (without read error correction)" />
+    <param name="careful" type="boolean" truevalue="--careful" falsevalue="" checked="True" label="Careful correction?" help="Tries to reduce number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses BWA tool (comes with SPAdes)." />
+    <param name="rectangle" type="boolean" truevalue="--rectangle" falsevalue="" checked="False" label="Use rectangle correction for repeat resolution?" help="Uses rectangle graph algorithm for repeat resolution stage instead of usual SPAdes repeat resolution module (experimental, use at your own risks)." />
     <param name="threads" type="integer" label="Number of threads to use" value="16">
     </param>
     <param name="iterations" type="integer" label="Number of iterations for read error correction." value="1">
     </param>    
-    <param name="kmers" type="text" label="K-mers to use, separated by commas" value="21,33,55" help="Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128 and listed in ascending order). The default value is 21,33,55." >
+    <param name="kmers" type="text" label="K-mers to use, separated by commas" value="21,33,55" help="Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128, listed in ascending order, and smaller than the read length). The default value is 21,33,55." >
     </param>
     <!-- Reads -->
-    <repeat name="reads" title="Reads">
-      <conditional name="read_type">
-	<param name="type" type="select" label="Select type of reads">
-	  <option value="pairedend">Paired-end, separate inputs</option>
-	  <option value="interleaved">Paired-end, interleaved</option>
-	  <option value="unpaired">Unpaired reads</option>
-	</param>
-	<when value="pairedend">
-	  <param name="fwd_reads" type="data" format="fastq" label="Forward reads" help="FASTQ format" />
-	  <param name="rev_reads" type="data" format="fastq" label="Reverse reads" help="FASTQ format" />
-	</when>
-	<when value="interleaved">
-	  <param name="interleaved_reads" type="data" format="fastq" label="Interleaved paired reads" help="FASTQ format" />
-	</when>
-	<when value="unpaired">
-	  <param name="unpaired_reads" type="data" format="fastq" label="Unpaired reads" help="FASTQ format" />
-	</when>
-      </conditional>
+    <repeat name="libraries" title="Libraries">
+      <param name="lib_type" type="select" label="Library type">
+	<option value="paired_end">Paired end / Single reads</option>
+	<option value="mate_paired">Mate pairs</option>
+      </param>
+      <param name="orientation" type="select" label="Orientation">
+	<option value="fr" selected="true">-> &lt;- (fr)</option>
+	<option value="rf">&lt;- -> (rf)</option>
+	<option value="ff">-> -> (ff)</option>
+      </param>
+      <repeat name="files" title="Files">
+	<conditional name="file_type">
+	  <param name="type" type="select" label="Select file format">
+	    <option value="separate">Separate input files</option>
+	    <option value="interleaved">Interleaved files</option>
+	    <option value="unpaired">Unpaired/Single reads</option>
+	  </param>
+	  <when value="separate">
+	    <param name="fwd_reads" type="data" format="fastq" label="Forward reads" help="FASTQ format" />
+	    <param name="rev_reads" type="data" format="fastq" label="Reverse reads" help="FASTQ format" />
+	  </when>
+	  <when value="interleaved">
+	    <param name="interleaved_reads" type="data" format="fastq" label="Interleaved paired reads" help="FASTQ format" />
+	  </when>
+	  <when value="unpaired">
+	    <param name="unpaired_reads" type="data" format="fastq" label="Unpaired reads" help="FASTQ format" />
+	  </when>
+	</conditional>
+      </repeat>
     </repeat>
   </inputs>
   <outputs>
@@ -84,9 +93,9 @@
     <data name="out_scaffold_stats" format="tabular" label="SPAdes scaffold stats" />
     <data name="out_log" format="txt" label="SPAdes log" />
   </outputs>
-  <tests>
+  <!--  <tests>
     <test>
-      <!-- Based on the tests coming along with SPAdes -->
+      
       <param name="sc" value="false" />
       <param name="careful" value="false" />
       <param name="rectangle" value="false" />
@@ -97,7 +106,7 @@
       <param name="rev_reads" value="ecoli_1K_2.fq" ftype="fastq" />
       <output name="out_contigs" file="reference_1K.fa" ftype="fasta" compare="re_match" lines_diff="1" />
     </test>
-  </tests>
+  </tests> -->
   <help>
 **What it does**