Mercurial > repos > nml > spades
diff spades.xml @ 9:24fffa4fee40 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author | iuc |
---|---|
date | Tue, 30 Oct 2018 20:27:11 -0400 |
parents | 884dc0264950 |
children | b8d633fbf5f5 |
line wrap: on
line diff
--- a/spades.xml Fri Sep 21 17:42:09 2018 -0400 +++ b/spades.xml Tue Oct 30 20:27:11 2018 -0400 @@ -1,19 +1,31 @@ -<tool id="spades" name="SPAdes" version="3.11.1+galaxy1"> +<tool id="spades" name="SPAdes" version="@TOOL_VERSION@"> <description>genome assembler for regular and single-cell projects</description> + <macros> + <import>macros.xml</import> + </macros> <requirements> - <requirement type="package" version="3.11.1">spades</requirement> + <requirement type="package" version="@TOOL_VERSION@">spades</requirement> </requirements> <stdio> <exit_code range="1:" /> + <regex match="Cannot allocate memory" + source="stdout" + level="fatal_oom" + description="Out of memory error occurred" /> <regex match="The reads contain too many k-mers to fit into available memory" source="stdout" level="fatal_oom" - description="Out of memory error occurred" /> + description="Out of memory error occurred" /> </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 -o . --disable-gzip-output $sc $onlyassembler $careful -t \${GALAXY_SLOTS:-16} + + if [[ -n \$GALAXY_MEMORY_MB ]]; then + GALAXY_MEMORY_GB=\$(( GALAXY_MEMORY_MB / 1024 )); + fi && + + spades.py -o . --disable-gzip-output $sc $onlyassembler $careful -t \${GALAXY_SLOTS:-16} -m \${GALAXY_MEMORY_GB:-250} #if not $kmer_choice.auto_kmer_choice: -k "$kmer_choice.kmers" #end if @@ -37,15 +49,17 @@ --$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 + --$prefix$i-1 $file.file_type.fwd_reads.extension:$file.file_type.fwd_reads + --$prefix$i-2 $file.file_type.fwd_reads.extension:$file.file_type.rev_reads #elif $file.file_type.type == "interleaved" - --$prefix$i-12 fastq:$file.file_type.interleaved_reads + --$prefix$i-12 $file.file_type.interleaved_reads.extension:$file.file_type.interleaved_reads + #elif $file.file_type.type == "merged" + --$prefix$i-m $file.file_type.merged_reads.extension:$file.file_type.merged_reads #elif $file.file_type.type == "unpaired" - --$prefix$i-s fastq:$file.file_type.unpaired_reads + --$prefix$i-s $file.file_type.unpaired_reads.extension:$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 + --$prefix$i-1 $file.file_type.fastq_collection.forward.extension:$file.file_type.fastq_collection.forward + --$prefix$i-2 $file.file_type.fastq_collection.reverse.extension:$file.file_type.fastq_collection.reverse #end if #end for #end for @@ -74,8 +88,8 @@ --untrusted-contigs $contig.extension:$contig #end if #end for - && cat contigs.fasta | python '$write_tsv_script' > '$out_contig_stats' - && cat scaffolds.fasta | python '$write_tsv_script' > '$out_scaffold_stats' + && python '$write_tsv_script' < contigs.fasta > '$out_contig_stats' + && python '$write_tsv_script' < scaffolds.fasta > '$out_scaffold_stats' ]]> </command> @@ -120,7 +134,7 @@ <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"> + <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" max="9" 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> @@ -137,30 +151,34 @@ <param label="Select file format" name="type" type="select"> <option value="separate">Separate input files</option> <option value="interleaved">Interleaved files</option> + <option value="merged">Merged 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" /> + <param format="@INTYPES@" help="FASTQ format" label="Forward reads" name="fwd_reads" type="data" /> + <param format="@INTYPES@" 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" /> + <param format="@INTYPES@" help="FASTQ format" label="Interleaved paired reads" name="interleaved_reads" type="data" /> + </when> + <when value="merged"> + <param format="@INTYPES@" help="FASTQ format" label="Merged paired reads" name="merged_reads" type="data" /> </when> <when value="unpaired"> - <param format="fastq" help="FASTQ format" label="Unpaired reads" name="unpaired_reads" type="data" /> + <param format="@INTYPES@" 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" /> + <param collection_type="paired" format="@INTYPES@" 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" /> + <param optional="true" format="@INTYPES@" label="PacBio CLR reads" multiple="true" name="pacbio_reads" type="data" /> + <param optional="true" format="@INTYPES@" label="Nanopore reads" multiple="true" name="nanopore_reads" type="data" /> + <param optional="true" format="@INTYPES@" label="Sanger reads" multiple="true" name="sanger_reads" type="data" /> + <param optional="true" format="@INTYPES@" label="Trusted contigs" multiple="true" name="trusted_contigs" type="data" /> + <param optional="true" format="@INTYPES@" label="Untrusted contigs" multiple="true" name="untrusted_contigs" type="data" /> <param name="contig_graph_out" type="boolean" checked="False" label="Output final assembly graph (contigs)?" help="Will output the final assembly graph (contigs) in fastg format for visualisation" /> <param name="scaffold_graph_out" type="boolean" checked="False" label="Output final assembly graph with scaffolds?" help="Will output the final assembly graph with scaffold information in gfa format for visualisation" /> </inputs> @@ -201,6 +219,35 @@ </assert_contents> </output> </test> + <test> <!-- Test 1 - basic test with k=33 fasta input --> + <param name="sc" value="false" /> + <param name="onlyassembler" value="true"/> + <param name="careful" value="false" /> + <param name="kmers" value="33" /> + <param name="lib_type" value="paired_end" /> + <param ftype="fasta" name="fwd_reads" value="ecoli_1K_1.fasta" /> + <param ftype="fasta" name="rev_reads" value="ecoli_1K_2.fasta" /> + <output compare="re_match" file="kmer_33_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> + <output name="out_contig_stats"> + <assert_contents> + <has_text_matching expression="NODE_1\t1000"/> + </assert_contents> + </output> + </test> + <test> <!-- Test 1 - basic test with k=33 and gzipped input --> + <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.gz" name="fwd_reads" value="ecoli_1K_1.fq.gz" /> + <param ftype="fastq.gz" name="rev_reads" value="ecoli_1K_2.fq.gz" /> + <output compare="re_match" file="kmer_33_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> + <output name="out_contig_stats"> + <assert_contents> + <has_text_matching expression="NODE_1\t1000"/> + </assert_contents> + </output> + </test> <test> <!-- Test 2 - auto k --> <param name="sc" value="false" /> <param name="careful" value="false" />