changeset 5:909c315b656d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit 9d484642914b581ce35f254466b849d3c4c2c06c-dirty
author iuc
date Wed, 01 Mar 2017 15:33:26 -0500
parents 35cb17bd8bf9
children 65c2d63fcbe6
files CHANGE spades.pl spades.xml tool_dependencies.xml
diffstat 4 files changed, 169 insertions(+), 419 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGE	Mon Aug 08 15:56:56 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-1.4
-===
- - Supports SPAdes 3.9
- - CHANGE : Several minor bugs.
-1.3
-===
- - Supports SPAdes 3.8
- - CHANGE: Improved running time and RAM consumption.
-
-1.2
-===
- - Supports SPades 3.6.2
-
-1.1
-===
- - Supports SPades 3.6.1
-
-1.0
-===
-- Supports SPAdes 3.5.0
-- New MismatchCorrector module.
-- Support for Oxford Nanopore long reads.
-- Support for Lucigen NxMate mate-pair libraries.
-- Possibility to specify coverage cutoff: automatic and manual.
-- CHANGE: Better running time.
-- CHANGE: Improved RAM consumption.
-- CHANGE: High-quality mate-pairs are now assumed to have forward-revers orientation (same as paired-end).
-
-FIX: Fixed FASTG format.
-0.9
-===
-- Supports SPAdes 3.1.1
-- Supports Mate-pair only assembly with high-quality libraries
-- Added support for List Paired Collection for files in a library.
-- Renaming of contig names in scaffolds and contig files if List Paired Collection given
-
-0.7
-===
-(thanks to Nicola Soranzo for fixing these bugs)
-- spades.pl doesn't die when NODE number is 0
-- removed the --rectangles option (will be deprecated in SPAdes 2.6), because it uses a different seqid format
-- switched the --threads parameter to $GALAXY_SLOTS
-- a few minor improvements
-
-0.6
-===
-- Supports SPAdes 2.5.1
-- Disables gzipped output for corrected reads
-- Removes the hack that was necessary to accept .dat files (thanks to SPAdes
-  new input format
-- Adds licensing information
-
-(started at version 0.6)
--- a/spades.pl	Mon Aug 08 15:56:56 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-#!/usr/bin/env perl
-## A wrapper script to call spades.py and collect its output
-use strict;
-use warnings;
-use File::Temp qw/ tempfile tempdir /;
-use File::Copy;
-use Getopt::Long;
-
-# Parse arguments
-my ($out_contigs_file,
-    $out_contigs_stats,
-    $out_scaffolds_file,
-    $out_scaffolds_stats,
-    $out_log_file,
-    $new_name,
-    @sysargs) = @ARGV;
-
-
-my $output_dir = 'output_dir';
-
-# Create log handle
-open my $log, '>', $out_log_file or die "Cannot write to $out_log_file: $?\n";
-
-# Run program
-runSpades(@sysargs);
-collectOutput($new_name);
-extractCoverageLength($out_contigs_file, $out_contigs_stats);
-extractCoverageLength($out_scaffolds_file, $out_scaffolds_stats);
-print $log "Done\n";
-close $log;
-exit 0;
-
-# Run spades
-sub runSpades {
-    my $cmd = join(" ", @_) . " -o $output_dir";
-    my $return_code = system($cmd);
-    if ($return_code) {
-	print $log "Failed with code $return_code\nCommand $cmd\nMessage: $?\n";
-	die "Failed with code $return_code\nCommand $cmd\nMessage: $?\n";
-    }
-    return 0;
-}
-
-# Collect output
-sub collectOutput{
-    my ($new_name) = @_;
-    
-    # To do: check that the files are there
-    # Collects output
-    if ( not -e "$output_dir/contigs.fasta") {
-        die "Could not find contigs.fasta file\n";
-    }
-    if ( not -e "$output_dir/scaffolds.fasta") {
-        die "Could not find scaffolds.fasta file\n";
-    }
-
-    #if a new name is given for the contigs and scaffolds, change them before moving them
-    if ( $new_name ne 'NODE') {
-        renameContigs($new_name);
-    }
-    else {
-        move "$output_dir/contigs.fasta", $out_contigs_file;
-        move "$output_dir/scaffolds.fasta", $out_scaffolds_file;        
-    }
-
-    
-
-    open LOG, '<', "$output_dir/spades.log" 
-	or die "Cannot open log file $output_dir/spades.log: $?";
-    print $log $_ while (<LOG>);
-    return 0;
-}
-
-#Change name in contig and scaffolds file
-sub renameContigs{
-    my ($name) = @_;
-
-    open my $in, '<',"$output_dir/contigs.fasta" or die $!;
-    open my $out,'>', $out_contigs_file;
-
-    while ( my $line = <$in>) {
-        #remove the NODE_ so we can rebuilt the display_id with our contig name with the contig number.
-        #also move the remainder of the length
-        if ( $line =~ />NODE_(\d+)_(.+)/) {
-            $line = ">$name" . "_$1 $2\n";
-        }
-        print $out $line;
-    }
-    close $in;
-    close $out;
-    
-
-    open $in, '<',"$output_dir/scaffolds.fasta" or die $!;
-    open $out,'>', $out_scaffolds_file;
-
-    while ( my $line = <$in>) {
-        #remove the NODE_ so we can rebuilt the display_id with our contig name with the contig number.
-        #also move the remainder of the length
-        if ( $line =~ />NODE_(\d+)_(.+)/) {
-            $line = ">$name" . "_$1 $2\n";
-        }
-        print $out $line;
-    }
-    close $in;
-    close $out;
-
-}
-
-
-# Extract
-sub extractCoverageLength{
-    my ($in, $out) = @_;
-    open FASTA, '<', $in or die $!;
-    open TAB, '>', $out or die $!;
-    print TAB "#name\tlength\tcoverage\n";
-    while (<FASTA>){
-	next unless /^>/;
-	chomp;
-	die "Not all elements found in $_\n" if (! m/^>(NODE|\S+)_(\d+)(?:_|\s)length_(\d+)_cov_(\d+\.*\d*)/);
-	my ($name,$n, $l, $cov) = ($1,$2, $3, $4);
-	print TAB "$name" . "_$n\t$l\t$cov\n";
-    }
-    close TAB;
-}
--- a/spades.xml	Mon Aug 08 15:56:56 2016 -0400
+++ b/spades.xml	Wed Mar 01 15:33:26 2017 -0500
@@ -1,255 +1,187 @@
-<tool id="spades" name="spades" version="1.4">
-  <description>SPAdes genome assembler for regular and single-cell projects</description>
-  <requirements>
-    <requirement type="package" version="3.9.0">spades</requirement>
-  </requirements>
-  <command interpreter="perl">spades.pl 
-    $out_contigs 
-    $out_contig_stats 
-    $out_scaffolds 
-    $out_scaffold_stats 
-    $out_log
-
-    ## if the first library file is a paired-collection, use the key as the name
-    #if $libraries[0].files[0].file_type.type == "paired-collection":
-        $libraries[0].files[0].file_type.fastq_collection.name
-    #else:
-        NODE
-    #end if
+<tool id="spades" name="SPAdes" version="3.9.0">
+    <description>genome assembler for regular and single-cell projects</description>
+    <requirements>
+        <requirement type="package" version="3.9.0">spades</requirement>
+    </requirements>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command>
+    <![CDATA[
     ## 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
-    ## Forces unzipped output, faster
-    --disable-gzip-output
-    $sc
-    $onlyassembler
-    $careful
-    -t \${GALAXY_SLOTS:-16}
-
+    spades.py -o . --disable-gzip-output $sc $onlyassembler $careful -t \${GALAXY_SLOTS:-16}
     #if not $kmer_choice.auto_kmer_choice:
-    -k "$kmer_choice.kmers"    
-    #else
-
+        -k "$kmer_choice.kmers"
     #end if
-
     #if $cov.state == "auto":
-    --cov-cutoff 'auto'
+        --cov-cutoff 'auto'
     #elif $cov.state == "value":
-    --cov-cutoff '$cov.cutoff'
+        --cov-cutoff '$cov.cutoff'
     #end if
-    
     $iontorrent
-    
     ## Sequence files, libraries
-    #for $i, $library in enumerate( $libraries )
-      #set num=$i+1
-      #if str( $library.lib_type ) == "paired_end":
-        #set prefix = 'pe'
-      #elif str( $library.lib_type ) == "mate_paired":
-        #set prefix = 'mp'
-      #elif str( $library.lib_type ) == "nxmate_paired":
-        #set prefix = 'nxmate'
-      #else:
-        #set prefix = 'hqmp'
-      #end if
-      --$prefix$num-$library.orientation    
-      #for $file in $library.files
-	#if $file.file_type.type == "separate"
-          --$prefix$num-1 fastq:$file.file_type.fwd_reads
-          --$prefix$num-2 fastq:$file.file_type.rev_reads
-        #elif $file.file_type.type == "interleaved"
-          --$prefix$num-12 fastq:$file.file_type.interleaved_reads
-        #elif $file.file_type.type == "unpaired"
-          --$prefix$num-s fastq:$file.file_type.unpaired_reads
-        #elif $file.file_type.type == "paired-collection"
-        --$prefix$num-1 fastq:$file.file_type.fastq_collection.forward
-        --$prefix$num-2 fastq:$file.file_type.fastq_collection.reverse
+    #for $i, $library in enumerate( $libraries, start=1 )
+        #if str( $library.lib_type ) == "paired_end":
+            #set prefix = 'pe'
+        #elif str( $library.lib_type ) == "mate_paired":
+            #set prefix = 'mp'
+        #elif str( $library.lib_type ) == "nxmate_paired":
+            #set prefix = 'nxmate'
+        #else:
+            #set prefix = 'hqmp'
         #end if
-      #end for
+        --$prefix$i-$library.orientation
+        #for $file in $library.files
+            #if $file.file_type.type == "separate"
+                --$prefix$i-1 fastq:$file.file_type.fwd_reads
+                --$prefix$i-2 fastq:$file.file_type.rev_reads
+            #elif $file.file_type.type == "interleaved"
+                --$prefix$i-12 fastq:$file.file_type.interleaved_reads
+            #elif $file.file_type.type == "unpaired"
+                --$prefix$i-s fastq:$file.file_type.unpaired_reads
+            #elif $file.file_type.type == "paired-collection"
+                --$prefix$i-1 fastq:$file.file_type.fastq_collection.forward
+                --$prefix$i-2 fastq:$file.file_type.fastq_collection.reverse
+            #end if
+        #end for
     #end for
-    ## PacBio reads
-    #for $i, $pacbiolib in enumerate( $pacbio )
-      --pacbio fastq:$pacbiolib.pacbio_reads
-    #end for
-    ## Nanopore
-    #for $i, $nanoporelib in enumerate( $nanopore )
-       --nanopore fastq:$nanoporelib.nanopore_reads
+    #for $read in $pacbio_reads:
+        #if $read:
+            --pacbio fastq:$read
+        #end if
     #end for
-    ## Sanger
-    #for $i, $sangerlib in enumerate( $sanger )
-      --sanger $sangerlib.file_type.type:$sangerlib.file_type.sanger_reads
-    #end for    
-    ## Contigs
-    #for $i, $trustedcontigs in enumerate( $trustedcontigs )
-      --trusted-contigs $trustedcontigs.file_type.type:$trustedcontigs.file_type.trusted_contigs
+    #for $read in $nanopore_reads:
+        #if $read:
+            --nanopore fastq:$read
+        #end if
+    #end for
+    #for $read in $sanger_reads:
+        #if $read:
+            --sanger $read.extension:$read
+        #end if
     #end for
-    #for $i, $untrustedcontigs in enumerate( $untrustedcontigs )
-      --untrusted-contigs $untrustedcontigs.file_type.type:$untrustedcontigs.file_type.untrusted_contigs
+    #for $contig in $trusted_contigs:
+        #if $contig:
+            --trusted-contigs $contig.extension:$contig
+        #end if
+    #end for
+    #for $contig in $untrusted_contigs:
+        #if $contig:
+            --untrusted-contigs $contig.extension:$contig
+        #end if
     #end for
-  </command>
-  <inputs>
-    <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="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)." />
-    <conditional name="kmer_choice">
-      <param name="auto_kmer_choice" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Automatically choose k-mer values" help="k-mer choices can be chosen by SPAdes instead of being entered manually" />
-      <when value="false">
-        <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." />
-      </when>
-      <when value="true"> </when>
-    </conditional>
-    <conditional name="cov">
-      <param name="state" type="select" label="Coverage Cutoff">
-        <option value="off">Off</option>
-        <option value="value">User Specific</option>
-        <option value="auto">Auto</option>
-      </param>
-      <when value="off">
-      </when>
-      <when value="value">
-        <param name="cutoff" type="float" label="Coverage cutoff value" value="" help="coverage cutoff value (a positive float number, or 'auto', or 'off') [default: 'off']" />        
-      </when>
-      <when value="auto">
-      </when>      
-    </conditional>
-
-
-        
-    <param name="iontorrent" type="boolean" truevalue="--iontorrent" falsevalue="" checked="False" label="Libraries are IonTorrent reads?" />
-    <!-- Reads -->
-    <repeat name="libraries" title="Libraries" min="1" help="It is not possible to specify only mate-pair libraries. Scaffolds are not produced if neither a paired-end nor a mate-pair library is provided.">
-      <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>
-        <option value="high_mate_paired">High Quality Mate pairs</option>
-        <option value="nxmate_paired">Lucigen NxMate 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" min="1">
-	<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>
-            <option value="paired-collection">Paired List Collection</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>
-          <when value="paired-collection">
-            <param name="fastq_collection" type="data_collection" label="Paired-end reads collection" optional="false" format="fastq" collection_type="paired" help="FASTQ format" /> 
-          </when>
-	</conditional>
-      </repeat>
-    </repeat>
-    <!-- PacBio -->
-    <repeat name="pacbio" title="PacBio CLR reads">
-      <param name="pacbio_reads" type="data" format="fastq" label="PacBio CLR reads." help="FASTQ format. For PacBio pre-corrected or CCS reads, use single reads above." />
-    </repeat>
-    <!-- Nanopore -->
-    <repeat name="nanopore" title="Nanopore reads">
-      <param name="nanopore_reads" type="data" format="fastq" label="Nanopore reads." help="FASTQ format. For Nanopore, use single reads above." />
-    </repeat>    
-    <!-- Sanger -->
-    <repeat name="sanger" title="Sanger reads">
-      <conditional name="file_type">
-	<param name="type" type="select" label="Select file format" help="No read correction is done on Sanger reads, no need to provide quality information.">
-	  <option value="fasta">fasta</option>
-	  <option value="fastq">fastq</option>
-	</param>
-	<when value="fasta">
-	  <param name="sanger_reads" type="data" format="fasta" label="Sanger reads" help="FASTA format" />
-	</when>
-	<when value="fastq">
-	  <param name="sanger_reads" type="data" format="fastq" label="Sanger reads" help="FASTQ format" />
-	</when>
-      </conditional>
-    </repeat>
-    <!-- Contigs -->
-    <repeat name="trustedcontigs" title="Trusted contigs" help="Reliable contigs of the same genome, which are likely to have no misassemblies and small rate of other errors (e.g. mismatches and indels). This option is not intended for contigs of the related species.">
-      <conditional name="file_type">
-	<param name="type" type="select" label="Select file format">
-	  <option value="fasta">fasta</option>
-	  <option value="fastq">fastq</option>
-	</param>
-	<when value="fasta">
-	  <param name="trusted_contigs" type="data" format="fasta" label="Trusted contigs" help="FASTA format" />
-	</when>
-	<when value="fastq">
-	  <param name="trusted_contigs" type="data" format="fastq" label="Trusted contigs" help="FASTQ format" />
-	</when>
-      </conditional>
-    </repeat>
-    <repeat name="untrustedcontigs" title="Untrusted contigs" help="Contigs of the same genome, quality of which is average or unknown. Contigs of poor quality can be used but may introduce errors in the assembly. This option is also not intended for contigs of the related species.">
-      <conditional name="file_type">
-	<param name="type" type="select" label="Select file format">
-	  <option value="fasta">fasta</option>
-	  <option value="fastq">fastq</option>
-	</param>
-	<when value="fasta">
-	  <param name="untrusted_contigs" type="data" format="fasta" label="Untrusted contigs" help="FASTA format" />
-	</when>
-	<when value="fastq">
-	  <param name="untrusted_contigs" type="data" format="fastq" label="Untrusted contigs" help="FASTQ format" />
-	</when>
-      </conditional>
-    </repeat>
-  </inputs>
-  <outputs>
-    <data name="out_contigs" format="fasta" label="SPAdes contigs (fasta)" />
-    <data name="out_contig_stats" format="tabular" label="SPAdes contig stats" />
-    <data name="out_scaffolds" format="fasta" label="SPAdes scaffolds (fasta)" />
-    <data name="out_scaffold_stats" format="tabular" label="SPAdes scaffold stats" />
-    <data name="out_log" format="txt" label="SPAdes log" />
-  </outputs>
-  <tests>
-    <test>
-      <param name="sc" value="false" />
-      <param name="careful" value="false" />
-      <param name="kmers" value="33" />
-      <param name="lib_type" value="paired_end" />
-      <param name="fwd_reads" value="ecoli_1K_1.fq" ftype="fastq" />
-      <param name="rev_reads" value="ecoli_1K_2.fq" ftype="fastq" />
-      <output name="out_contigs" file="kmer_33_output.fa" ftype="fasta" compare="re_match" lines_diff="1" />
-    </test> 
-    <test>
-      <param name="sc" value="false" />
-      <param name="careful" value="false" />
-      <param name="auto_kmer_choice" value="true" />
-      <param name="lib_type" value="paired_end" />
-      <param name="fwd_reads" value="ecoli_1K_1.fq" ftype="fastq" />
-      <param name="rev_reads" value="ecoli_1K_2.fq" ftype="fastq" />
-      <output name="out_contigs" file="auto_kmer_output.fa" ftype="fasta" compare="re_match" lines_diff="1" />
-    </test> 
-    <test>
-      <param name="sc" value="false" />
-      <param name="careful" value="false" />
-      <param name="kmers" value="77" />
-      <param name="lib_type" value="paired_end" />
-      <param name="fwd_reads" value="ecoli_1K_1.fq" ftype="fastq" />
-      <param name="rev_reads" value="ecoli_1K_2.fq" ftype="fastq" />
-      <output name="out_contigs" file="kmer_77_output.fa" ftype="fasta" compare="re_match" lines_diff="1" />
-    </test> 
- </tests>
-  <help>
+    ]]>
+    </command>
+    <inputs>
+        <param argument="--sc" falsevalue="" help="This option is required for MDA (single-cell) data." label="Single-cell?" name="sc" truevalue="--sc" type="boolean">
+            <option value="false">No</option>
+            <option value="true">Yes</option>
+        </param>
+        <param argument="--only-assembler" checked="False" falsevalue="" label="Run only assembly? (without read error correction)" name="onlyassembler" truevalue="--only-assembler" type="boolean" />
+        <param argument="----careful" checked="True" falsevalue="" help="Tries to reduce number of mismatches and short indels. Also runs MismatchCorrector &#8211; a post processing tool, which uses BWA tool (comes with SPAdes)." label="Careful correction?" name="careful" truevalue="--careful" type="boolean" />
+        <conditional name="kmer_choice">
+            <param checked="False" falsevalue="false" help="k-mer choices can be chosen by SPAdes instead of being entered manually" label="Automatically choose k-mer values" name="auto_kmer_choice" truevalue="true" type="boolean" />
+            <when value="false">
+                <param 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." label="K-mers to use, separated by commas" name="kmers" type="text" value="21,33,55" />
+            </when>
+            <when value="true" />
+        </conditional>
+        <conditional name="cov">
+            <param label="Coverage Cutoff" name="state" type="select">
+                <option value="off">Off</option>
+                <option value="value">User Specific</option>
+                <option value="auto">Auto</option>
+            </param>
+            <when value="off" />
+            <when value="value">
+                <param help="coverage cutoff value (a positive float number, or 'auto', or 'off') [default: 'off']" label="Coverage cutoff value" name="cutoff" type="float" value="" />
+            </when>
+            <when value="auto" />
+        </conditional>
+        <param checked="False" falsevalue="" label="Libraries are IonTorrent reads?" name="iontorrent" truevalue="--iontorrent" type="boolean" />
+        <repeat help="It is not possible to specify only mate-pair libraries. Scaffolds are not produced if neither a paired-end nor a mate-pair library is provided." min="1" name="libraries" title="Libraries">
+            <param label="Library type" name="lib_type" type="select">
+                <option value="paired_end">Paired-end / Single reads</option>
+                <option value="mate_paired">Mate pairs</option>
+                <option value="high_mate_paired">High Quality Mate pairs</option>
+                <option value="nxmate_paired">Lucigen NxMate pairs</option>
+            </param>
+            <param label="Orientation" name="orientation" type="select">
+                <option selected="true" value="fr"><![CDATA[-> <- (fr)]]></option>
+                <option value="rf"><![CDATA[<- -> (rf)]]></option>
+                <option value="ff"><![CDATA[-> -> (ff)]]></option>
+            </param>
+            <repeat min="1" name="files" title="Files">
+                <conditional name="file_type">
+                    <param label="Select file format" name="type" type="select">
+                        <option value="separate">Separate input files</option>
+                        <option value="interleaved">Interleaved files</option>
+                        <option value="unpaired">Unpaired/Single reads</option>
+                        <option value="paired-collection">Paired List Collection</option>
+                    </param>
+                    <when value="separate">
+                        <param format="fastq" help="FASTQ format" label="Forward reads" name="fwd_reads" type="data" />
+                        <param format="fastq" help="FASTQ format" label="Reverse reads" name="rev_reads" type="data" />
+                    </when>
+                    <when value="interleaved">
+                        <param format="fastq" help="FASTQ format" label="Interleaved paired reads" name="interleaved_reads" type="data" />
+                    </when>
+                    <when value="unpaired">
+                        <param format="fastq" help="FASTQ format" label="Unpaired reads" name="unpaired_reads" type="data" />
+                    </when>
+                    <when value="paired-collection">
+                        <param collection_type="paired" format="fastq" help="FASTQ format" label="Paired-end reads collection" name="fastq_collection" optional="false" type="data_collection" />
+                    </when>
+                </conditional>
+            </repeat>
+        </repeat>
+        <param optional="true" format="fastq" label="PacBio CLR reads" multiple="true" name="pacbio_reads" type="data" />
+        <param optional="true" format="fastq" label="Nanopore reads" multiple="true" name="nanopore_reads" type="data" />
+        <param optional="true" format="fasta,fastq" label="Sanger reads" multiple="true" name="sanger_reads" type="data" />
+        <param optional="true" format="fasta,fastq" label="Trusted contigs" multiple="true" name="trusted_contigs" type="data" />
+        <param optional="true" format="fasta,fastq" label="Untrusted contigs" multiple="true" name="untrusted_contigs" type="data" />
+    </inputs>
+    <outputs>
+        <data format="fasta" from_work_dir="contigs.fasta" label="SPAdes contigs (fasta)" name="out_contigs" />
+        <data format="fasta" from_work_dir="scaffolds.fasta" label="SPAdes scaffolds (fasta)" name="out_scaffolds" />
+        <data format="txt" from_work_dir="spades.log" label="SPAdes log" name="out_log" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="sc" value="false" />
+            <param name="careful" value="false" />
+            <param name="kmers" value="33" />
+            <param name="lib_type" value="paired_end" />
+            <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" />
+            <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" />
+            <output compare="re_match" file="kmer_33_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" />
+        </test>
+        <test>
+            <param name="sc" value="false" />
+            <param name="careful" value="false" />
+            <param name="auto_kmer_choice" value="true" />
+            <param name="lib_type" value="paired_end" />
+            <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" />
+            <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" />
+            <output compare="re_match" file="auto_kmer_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" />
+        </test>
+        <test>
+            <param name="sc" value="false" />
+            <param name="careful" value="false" />
+            <param name="kmers" value="77" />
+            <param name="lib_type" value="paired_end" />
+            <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" />
+            <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" />
+            <output compare="re_match" file="kmer_77_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
 **What it does**
 
 SPAdes – St. Petersburg genome assembler – is intended for both standard isolates and single-cell MDA bacteria assemblies. See http://bioinf.spbau.ru/en/spades for more details on SPAdes.
 
-This wrapper runs SPAdes 3.9, collects the output, and throws away all the temporary files. It also produces a tab file with contig names, length and coverage. 
+This wrapper runs SPAdes 3.9, collects the output, and throws away all the temporary files. It also produces a tab file with contig names, length and coverage.
 
 **License**
 
@@ -268,7 +200,8 @@
 Anton Korobeynikov greatlty helped understanding how SPAdes work, and integrated handy features into SPAdes.
 
 Nicola Soranzo fixed various bugs.
-  </help>
+]]>
+    </help>
     <citations>
         <citation type="doi">10.1089/cmb.2012.0021</citation>
     </citations>
--- a/tool_dependencies.xml	Mon Aug 08 15:56:56 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="spades" version="3.9.0">
-        <repository changeset_revision="d8c8c3dc8f9a" name="package_spades_3_9_0" owner="nml" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>