view macros.xml @ 1:45b5f747c900 draft default tip

planemo upload commit 611f051119d03ed04af67a33e403496bc3e7cc1e
author galaxytrakr
date Thu, 19 Mar 2026 15:43:04 +0000
parents f69397b32f52
children
line wrap: on
line source

<macros>
    <token name="@TOOL_VERSION@">4.2.0</token>
    <token name="@VERSION_SUFFIX@">0</token>
    
    <xml name="requirements">
        <requirements>
          <requirement type="package" version="@TOOL_VERSION@">spades</requirement> 
        </requirements>
    </xml>
    <xml name="stdio">
        <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"/>
        </stdio>
    </xml>
    <xml name="version_command">
        <version_command><![CDATA[spades.py --version 2>&1 | awk -F 'v' '{print $2}']]></version_command>
    </xml>
    <token name="@FASTA_INTYPES@">fasta,fasta.gz</token>
    <token name="@FASTQ_INTYPES@">fastqillumina,fastqillumina.gz,fastqsanger,fastqsanger.gz</token>
    <token name="@INTYPES@">@FASTQ_INTYPES@,@FASTA_INTYPES@</token>

    <xml name="citations">
        <citations>
            <citation type="doi">10.1093/bioinformatics/btv688</citation>
            <citation type="doi">10.1093/bioinformatics/btu266</citation>
            <citation type="doi">10.1093/bioinformatics/btv337</citation>
            <yield/>
          </citations>
    </xml>
    <xml name="operation_mode" token_help="">
        <param name="operation_mode" type="select" label="Operation mode" help="@HELP@">
            <option value="">Assembly and error correction</option>
            <option value="--only-assembler">Only assembler (--only-assembler)</option>
            <option value="--only-error-correction">Only error correction (--only-error-correction)</option>
        </param>
    </xml>
    
<token name="@OMP_THREADS@"><![CDATA[
export OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-4} &&
]]></token>

<!-- PREPARE INPUT FILES-->

<token name="@PREPROCESS_INPUT_FILES_MAIN@"><![CDATA[
#import re
#def fix_ext($ext):
    #set ext = $ext.replace('fastqsanger', 'fastq')
    #set ext = $ext.replace('fastqillumina', 'fastq')
    #return $ext
#end def

#if $singlePaired.sPaired == "single" or $singlePaired.sPaired == "paired_interlaced"
    mkdir -p reads1 &&
    #set file_paths1 = []
    #for $input_file in $singlePaired.input1
        #set ext = $fix_ext($input_file.ext)
        #set fname = re.sub('[^\w\-_.]', '_', $input_file.element_identifier) + '.' + $ext
        #set file_path = 'reads1/' + $fname
        ln -s '$input_file' '$file_path' &&
        $file_paths1.append($file_path)
    #end for
#else
    ## one mapped-in paired dataset (Galaxy maps list:paired -> 1 job per pair)
    mkdir -p paired_reads1 &&
    #set fw_reads1 = []
    #set rv_reads1 = []
    #set ext = $fix_ext($singlePaired.input.forward.ext)
    #set base = re.sub('[^\w\-_.]', '_', $singlePaired.input.element_identifier)
    #set f1 = 'paired_reads1/' + $base + '1.' + $ext
    #set f2 = 'paired_reads1/' + $base + '2.' + $ext
    ln -s '$singlePaired.input.forward' '$f1' &&
    ln -s '$singlePaired.input.reverse' '$f2' &&
    $fw_reads1.append($f1)
    $rv_reads1.append($f2)
#end if
]]></token>

<token name="@PREPROCESS_INPUT_FILES_ADDITIONAL@"><![CDATA[
#if $additional_reads.singlePaired.sPaired == "single" or $additional_reads.singlePaired.sPaired == "paired_interlaced"
    mkdir -p reads2 &&
    #set file_paths2 = []
    #for $input_file in $additional_reads.singlePaired.input1
        #set ext = $fix_ext($input_file.ext)
        #set fname = re.sub('[^\w\-_.]', '_', $input_file.element_identifier) + '.' + $ext
        #set file_path = 'reads2/' + $fname
        ln -s '$input_file' '$file_path' &&
        $file_paths2.append($file_path)
    #end for
#else
    ## one mapped-in paired dataset for the additional library
    mkdir -p paired_reads2 &&
    #set fw_reads2 = []
    #set rv_reads2 = []
    #set ext = $fix_ext($additional_reads.singlePaired.input.forward.ext)
    #set base = re.sub('[^\w\-_.]', '_', $additional_reads.singlePaired.input.element_identifier)
    #set f1 = 'paired_reads2/' + $base + '1.' + $ext
    #set f2 = 'paired_reads2/' + $base + '2.' + $ext
    ln -s '$additional_reads.singlePaired.input.forward' '$f1' &&
    ln -s '$additional_reads.singlePaired.input.reverse' '$f2' &&
    $fw_reads2.append($f1)
    $rv_reads2.append($f2)
#end if
]]></token>

<!-- COMMANDS -->

<token name="@RESOURCES@"><![CDATA[
-t \${GALAXY_SLOTS:-4}
-m \$((\${GALAXY_MEMORY_MB:-8192}/1024))
--tmp-dir \${TMPDIR}	
]]></token>

<token name="@INPUT_READS_MAIN@"><![CDATA[
#if $singlePaired.sPaired == "single"
    #for $read in $file_paths1
        --s $library '${read}'
    #end for
#else if $singlePaired.sPaired == "paired_interlaced"
    #for $read in $file_paths1
        --${singlePaired.type_paired}-12 $library '${read}'
        --${singlePaired.type_paired}-or $library $singlePaired.orientation
    #end for
#else
    #for $read in $fw_reads1
        --${singlePaired.type_paired}-1 $library '${read}'
    #end for
    #for $read in $rv_reads1
        --${singlePaired.type_paired}-2 $library '${read}'
        --${singlePaired.type_paired}-or $library $singlePaired.orientation
    #end for
#end if
]]></token>


<token name="@INPUT_READS_ADDITIONAL@"><![CDATA[
@LIBRARY_NUMBER@
#if $additional_reads.singlePaired.sPaired == "single"
    #for $read in $file_paths2
        --s $library '${read}'
    #end for
#else if $additional_reads.singlePaired.sPaired == "paired_interlaced"
    #for $read in $file_paths2
        --${additional_reads.singlePaired.type_paired}-12 $library '${read}'
        --${additional_reads.singlePaired.type_paired}-or $library $additional_reads.singlePaired.orientation
    #end for
#else
    #for $read in $fw_reads2
        --${additional_reads.singlePaired.type_paired}-1 $library '${read}'
    #end for
    #for $read in $rv_reads2
        --${additional_reads.singlePaired.type_paired}-2 $library '${read}'
        --${additional_reads.singlePaired.type_paired}-or $library $additional_reads.singlePaired.orientation
    #end for
#end if
]]></token>

<token name="@PIPELINE_OPTIONS@"><![CDATA[
#for $i in $mode_sel
    $i
#end for
]]></token>

<token name="@KMER@"><![CDATA[
#if $kmer_cond.kmer_sel != 'auto'
    -k '$kmer_cond.manual'
#end if
]]></token>

<token name="@PHREDOFFSET@"><![CDATA[
#if $phred_offset != 'auto'
    --phred-offset $phred_offset
#end if
]]></token>

<!-- ADDITIONAL INPUTS-->

<token name="@PREPROCESS_CONTIGS_FILES@"><![CDATA[
#if $arf.trusted_contigs
    mkdir -p trusted_contigs &&
    #set trusted_contigs = []
    #for $i, $input_file in enumerate($arf.trusted_contigs,1)
        #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
        #set $fname = 'file' + str($i) + '.' + $ext
        #set $file_path = 'trusted_contigs/' + $fname
        ln -s '$input_file' '$file_path' &&
        $trusted_contigs.append($file_path)
    #end for
#end if
#if $arf.untrusted_contigs
    mkdir -p untrusted_contigs &&
    #set untrusted_contigs = []
    #for $i, $input_file in enumerate($arf.untrusted_contigs,1)
        #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
        #set $fname = 'file' + str($i) + '.' + $ext
        #set $file_path = 'untrusted_contigs/' + $fname
        ln -s '$input_file' '$file_path' &&
        $untrusted_contigs.append($file_path)
    #end for
#end if
]]></token>

<token name="@PREPROCESS_NANOPORE_PACBIO_FILES@"><![CDATA[
#if $arf.nanopore
    mkdir -p nanopore_reads &&
    #set nanopore_reads = []
    #for $i, $input_file in enumerate($arf.nanopore,1)
        #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
        #set $fname = 'file' + str($i) + '.' + $ext
        #set $file_path = 'nanopore_reads/' + $fname
        ln -s '$input_file' '$file_path' &&
        $nanopore_reads.append($file_path)
    #end for
#end if
#if $arf.pacbio
    mkdir -p pacbio_reads &&
    #set pacbio_reads = []
    #for $i, $input_file in enumerate($arf.pacbio,1)
        #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
        #set $fname = 'file' + str($i) + '.' + $ext
        #set $file_path = 'pacbio_reads/' + $fname
        ln -s '$input_file' '$file_path' &&
        $pacbio_reads.append($file_path)
    #end for
#end if
]]></token>

<token name="@PREPROCESS_SANGER_FILES@"><![CDATA[
    #if $arf.sanger
        mkdir -p sanger_reads &&
        #set sanger_reads = []
        #for $i, $input_file in enumerate($arf.sanger,1)
            #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
            #set $fname = 'file' + str($i) + '.' + $ext
            #set $file_path = 'sanger_reads/' + $fname
            ln -s '$input_file' '$file_path' &&
            $sanger_reads.append($file_path)
        #end for
    #end if
]]></token>

<token name="@PREPROCESS_FL_RNA_FILES@"><![CDATA[
    #if $arf.flrna
        mkdir -p flrna_reads &&
        #set flrna_reads = []
        #for $i, $input_file in enumerate($arf.flrna,1)
            #set $ext = $input_file.ext.replace('fastqsanger', 'fastq')
            #set $fname = 'file' + str($i) + '.' + $ext
            #set $file_path = 'flrna_reads/' + $fname
            ln -s '$input_file' '$file_path' &&
            $flrna_reads.append($file_path)
        #end for
    #end if
]]></token>

<token name="@PREPROCESS_ASSEMBLY_GRAPH_FILES@"><![CDATA[
    #if $arf.assembly_graph
        mkdir -p assembly_graphs &&
        #set assembly_graphs = []
        #for $i, $input_file in enumerate($arf.assembly_graph,1)
            #set $ext = $input_file.ext.replace('gfa1', 'gfa')
            #set $fname = 'file' + str($i) + '.' + $ext
            #set $file_path = 'assembly_graphs/' + $fname
            ln -s '$input_file' '$file_path' &&
            $assembly_graphs.append($file_path)
        #end for
    #end if
]]></token>


<token name="@NANOPORE_PACBIO@"><![CDATA[
#if $arf.nanopore
    #for $read in $nanopore_reads
        --nanopore $read
    #end for
#end if
#if $arf.pacbio
    #for $read in $pacbio_reads
        --pacbio $read
    #end for
#end if
]]></token>


<token name="@SANGER@"><![CDATA[
#if $arf.sanger
    #for $read in $sanger_reads
        --sanger $read
    #end for
#end if
]]></token>

<token name="@FL_RNA@"><![CDATA[
#if $arf.flrna
    #for $read in $flrna_reads
        --fl-rna $read
    #end for
#end if
]]></token>

<token name="@ASSEMBLY_GRAPH@"><![CDATA[
#if $arf.assembly_graph
    #for $graph in $assembly_graphs
        --assembly-graph $graph
    #end for
#end if
]]></token>

<token name="@CONTIGS@"><![CDATA[
#if $arf.trusted_contigs
    #for $read in $trusted_contigs
        --trusted-contigs $read
    #end for
#end if
#if $arf.untrusted_contigs
    #for $read in $untrusted_contigs
        --untrusted-contigs $read
    #end for
#end if
]]></token>

<token name="@LIBRARY_NUMBER@"><![CDATA[
#if $additional_reads.selector == 'true' and  $additional_reads.library_number == 'false'
    #set $library += 1
#end if
]]></token>

<!-- POSTPROCESSING -->

<token name="@STATS@"><![CDATA[
#if 'cs' in $optional_output
    && (test -f 'output/contigs.fasta' && python '$__tool_directory__/write_tsv_script.py' < 'output/contigs.fasta' > '$out_cs' || echo 'No contigs.fasta.')
#end if
#if 'ss' in $optional_output
    && (test -f 'output/scaffolds.fasta' && python '$__tool_directory__/write_tsv_script.py' < 'output/scaffolds.fasta' > '$out_ss' || echo 'No scaffolds.fasta.')
#end if
]]></token>

    <!--
      input
    -->

    <xml name="input_files_all" token_format="" token_label="" token_help="It assumes that all samples belong to the same library. If you want to use samples from two different libraries, include the second library as additional set of short-reads.">
        <conditional name="singlePaired">
            <param name="sPaired" type="select" label="Single-end or paired-end short-reads" help="@HELP@">
                <option value="single">Single-end</option>
                <option value="paired_interlaced">Paired-end: interlaced reads</option>
                <option value="paired_collection" selected="true">Paired-end: list of dataset pairs</option>
            </param>
            <when value="single">
                <param format="@FORMAT@" name="input1" type="data"  multiple="true" label="@LABEL@"/>
            </when>
            <when value="paired_interlaced">
                <param format="@FORMAT@" name="input1" type="data"  multiple="true" label="@LABEL@: interlaced"/>
                <expand macro="type_paired"/>
                <expand macro="orientation"/>
            </when>
            <when value="paired_collection">
                <!-- CHANGED: list:paired -> paired (Galaxy maps lists) -->
                <param format="@FORMAT@" name="input" type="data_collection" collection_type="paired" label="@LABEL@: collection (a single pair; lists will map)"/>
                <expand macro="type_paired"/>
                <expand macro="orientation"/>
            </when>
        </conditional>
    </xml>

    <xml name="input_files_paired" tokens="format,label" token_help="It assumes that all samples belong to the same library. If you want to use samples from two different libraries, include the second library as additional set of short-reads.">
        <conditional name="singlePaired">
            <param name="sPaired" type="select" label="Pair-end reads input format" help="@HELP@">
                <option value="paired_interlaced">Paired-end: interlaced reads</option>
                <option value="paired_collection" selected="true">Paired-end: list of dataset pairs</option>
            </param>
            <when value="paired_interlaced">
                <param format="@FORMAT@" name="input1" type="data"  multiple="true" label="@LABEL@: interlaced"/>
                <expand macro="type_paired"/>
                <expand macro="orientation"/>
            </when>
            <when value="paired_collection">
                <!-- CHANGED: list:paired -> paired -->
                <param format="@FORMAT@" name="input" type="data_collection" collection_type="paired" label="@LABEL@: collection (a single pair; lists will map)"/>
                <expand macro="type_paired"/>
                <expand macro="orientation"/>
            </when>
        </conditional>
        <param name="library_number" type="select" label="The samples belong to the same library" help="If the reads have been generated from the same sample, it means that they belong to the same library.">
            <option value="true" selected="true">True</option>
            <option value="false">False</option>
        </param>
    </xml>

    <xml name="orientation">
        <param name="orientation" type="select" label="Select orientation of reads" help="Note: mate-pair fragments are generally in a RF conformation. In general, paired-end reads tend to be in a FR orientation.">
            <option value="fr" selected="true"><![CDATA[FR (-> <-)]]></option>
            <option value="rf"><![CDATA[RF (<- ->)]]></option>
            <option value="ff"><![CDATA[FF (-> ->)]]></option>
        </param>
    </xml>

    <xml name="type_paired">
        <param name="type_paired" type="select" label="Type of paired-reads" 
            help="In paired-end sequencing, the library preparation yields a set of fragments, and the machine sequences each fragment from both ends. In mate-pair sequencing, 
                the library preparation yields two fragments that are distal to each other in the genome and in the opposite in orientation to that of a mate-paired fragment.">
            <option value="pe" selected="true">Default (--pe)</option>
            <option value="mp">Mate-pair reads (--mp)</option>
            <option value="hqmp">High-quality Nextera mate-pair reads (--hqmp)</option>
        </param>
    </xml>

    <xml name="input_additional_files_all" tokens="format" token_help="">
        <conditional name="additional_reads">
            <param name="selector" type="select" label="Use an additional set of short-reads" help="Enable this option if you want to combine to data sources (e.g. single and paired reads).">
                <option value="false" selected="true">Disabled</option>
                <option value="true">Enabled</option>
            </param>
            <when value="true">
                <expand macro="input_files_all" format="@FORMAT@" label="FASTA/FASTQ file(s)" help="@HELP@"/>
                <param name="library_number" type="select" label="The samples belong to the same library" help="If the reads have been generated from the sample sample, it means that they belong to the same library.">
                    <option value="true" selected="true">True</option>
                    <option value="false">False</option>
                </param>
            </when>
            <when value="false"/>
        </conditional>
    </xml>

    <xml name="input_additional_files_paired" tokens="format" token_help="" >
        <conditional name="additional_reads">
            <param name="selector" type="select" label="Use an additional set of short-reads" help="Enable this option if you want to combine to data sources (e.g. single and paired reads).">
                <option value="false" selected="true">Disabled</option>
                <option value="true">Enabled</option>
            </param>
            <when value="true">
                <expand macro="input_files_paired" format="@FORMAT@" label="FASTA/FASTQ file(s)" help="@HELP@"/>
            </when>
            <when value="false"/>
        </conditional>
    </xml>

    <xml name="covcutoff">
        <conditional name="cov_cond">
            <param argument="--cov-cutoff" type="select" label="Set coverage cutoff option" help="When set to 'auto' SPAdes automatically computes coverage threshold using conservative strategy">
                <option value="off">Off</option>
                <option value="auto">Auto</option>
                <option value="value">User specific</option>
            </param>
            <when value="off"/>
            <when value="auto"/>
            <when value="value">
                <param name="manual" type="float" min="0" value="" label="Set value"/>
            </when>
        </conditional>
    </xml>
    <xml name="pipeline_options" token_additional_help="">
        <param name="mode_sel" type="select" label="Pipeline options"  multiple="true" optional="true" display="checkboxes" help="Error correction requires FASTQ input files. @ADDITIONAL_HELP@">
            <option value="--disable-rr">Disable repeat resolution (--disable-rr)</option>
            <yield/>
        </param>
    </xml>
    <xml name="kmer" token_help="" token_default="21,33,55,77">
        <conditional name="kmer_cond">
            <param name="kmer_sel" argument="-k" type="select" label="Select k-mer detection option" help="@HELP@ Comma-separated list, all values must be odd, less than 128 and listed in ascending order.">
                <option value="auto">Auto</option>
                <option value="manual">User specific</option>
            </param>
            <when value="auto"/>
            <when value="manual">
                <param name="manual" type="text" value="@DEFAULT@" label="K-mer size values" help="List of k-mer sizes (must be odd and less than 128)">
                    <sanitizer invalid_char="">
                        <valid initial="string.digits">
                            <add value="," />
                        </valid>
                    </sanitizer>
                    <validator type="regex">[0-9,]+</validator>
                </param>
            </when>
        </conditional>
    </xml>
    <xml name="nanopore_pacbio">
        <param argument="--nanopore" type="data" format="@FASTQ_INTYPES@" multiple="true" optional="true" label="Nanopore reads" help="SPAdes will use Oxford Nanopore reads for gap closure and repeat resolution"/>
        <param argument="--pacbio" type="data" format="@FASTQ_INTYPES@" multiple="true" optional="true" label="PacBio CLR reads" help="It is not recommended to run SPAdes on PacBio reads with low coverage (less than 5). In addition, SPAdes develpers suggest not to run SPAdes on PacBio reads for large genomes. SPAdes will use PacBio CLR reads for gap closure and repeat resolution"/>
    </xml>
    <xml name="flrna">
        <param argument="--fl-rna" name="flrna" type="data" format="@INTYPES@" multiple="true" optional="true" label="PacBio/Nanopore/contigs that capture full-length transcripts" help="In addition to long reads, you may also provide a separate file with reads capturing the entire transcript sequences using this option. Full-length transcripts in such reads can be typically detected using the adapters. Note, that FL reads should be trimmed so that the adapters are excluded."/>
    </xml>

    <xml name="phred">
        <param argument="--phred-offset" type="select" label="Set Phred quality offset" help="Phred quality offset in the input reads. Default: auto-detect">
            <option value="auto" selected="true">Auto</option>
            <option value="33">33 (Sanger)</option>
            <option value="64">64 (Illumina)</option>
        </param>
    </xml>
    <xml name="reads" token_paramname="reads" token_help="" token_label="">
        <param name="@PARAMNAME@" type="data" format="@FASTQ_INTYPES@" label="@LABEL@ reads" help="@HELP@"/>
    </xml>
    <xml name="sanger">
        <param argument="--sanger" type="data" format="@FASTQ_INTYPES@" multiple="true" optional="true" label="Sanger reads"/>
    </xml>
    <xml name="contigs">
        <param argument="--trusted-contigs" type="data" format="@FASTA_INTYPES@" multiple="true" optional="true" label="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."/>
        <param argument="--untrusted-contigs" type="data" format="@FASTA_INTYPES@" multiple="true" optional="true" label="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."/>
    </xml>
    <xml name="assembly_graph">
        <param argument="--assembly-graph" type="data" format="gfa1" multiple="true" optional="true" label="Assembly graphs" help=" The primary purpose of this option to run these pipelines on already constructed and simplified assembly graph this way skipping a large part of SPAdes pipeline."/>
    </xml>
    <xml name="optional_output">
        <param name="optional_output" type="select" multiple="true" optional="false" label="Select optional output file(s)" help="Only shown in history if selected here and generated by the specific run.">
            <option value="ag" selected="true">Assembly graph</option>
            <option value="ags" selected="true">Assembly graph with scaffolds</option>
            <option value="cn" selected="true">Contigs</option>
            <option value="cp">Contigs paths</option>
            <option value="cr">Corrected reads</option>
            <option value="cs">Contigs stats</option>
            <option value="l">Log</option>
            <option value="sc" selected="true">Scaffolds</option>
            <option value="sp">Scaffolds paths</option>
            <option value="ss">Scaffolds stats</option>            
        </param>
    </xml>
    <!--
      output macros (unchanged; Galaxy will collect into a list when mapped)
    -->

    <xml name="out_ag">
        <data name="out_ag" format="fastg" from_work_dir="output/assembly_graph.fastg" label="${tool.name} on ${on_string}: Assembly graph">
            <filter>'ag' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_ags">
        <data name="out_ags" format="txt" from_work_dir="output/assembly_graph_with_scaffolds.gfa" label="${tool.name} on ${on_string}: Assembly graph with scaffolds">
            <filter>'ags' in optional_output</filter>
            <filter>'operation_mode' not in vars() or  operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_cn">
        <data name="out_cn" format="fasta" from_work_dir="output/contigs.fasta" label="${tool.name} on ${on_string}: Contigs">
            <filter>'cn' in optional_output</filter>
            <filter>'operation_mode' not in vars() or  operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_cp">
        <data name="out_cp" format="txt" from_work_dir="output/contigs.paths" label="${tool.name} on ${on_string}: Contigs paths">
            <filter>'cp' in optional_output</filter>
            <filter>'operation_mode' not in vars() or  operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_cr">
        <collection name="out_cr" type="list" label="${tool.name} on ${on_string}: Corrected reads">
            <filter>'cr' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-assembler'</filter>
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.cor\.fastq\.gz" format="fastq" directory="output/corrected"/>
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.cor\.fasta\.gz" format="fasta" directory="output/corrected"/>
        </collection>
    </xml>
    <xml name="out_cs">
        <data name="out_cs" format="tabular" label="${tool.name} on ${on_string}: Contigs stats">
            <actions>
                <action name="column_names" type="metadata" default="name,length,coverage"/>
            </actions>
            <filter>'cs' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_l">
        <data name="out_l" format="txt" from_work_dir="output/spades.log" label="${tool.name} on ${on_string}: Log">
            <filter>'l' in optional_output</filter>
        </data>
    </xml>
    <xml name="out_sc">
        <data name="out_sc" format="fasta" from_work_dir="output/scaffolds.fasta" label="${tool.name} on ${on_string}: Scaffolds">
            <filter>'sc' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_sp">
        <data name="out_sp" format="txt" from_work_dir="output/scaffolds.paths" label="${tool.name} on ${on_string}: Scaffolds paths">
            <filter>'sp' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_ss">
        <data name="out_ss" format="tabular" label="${tool.name} on ${on_string}: Scaffolds stats">
            <actions>
                <action name="column_names" type="metadata" default="name,length,coverage"/>
            </actions>
            <filter>'ss' in optional_output</filter>
            <filter>'operation_mode' not in vars() or operation_mode != '--only-error-correction'</filter>
        </data>
    </xml>
    <xml name="out_rs">
        <data name="out_rs" format="fasta" from_work_dir="output/raw_scaffolds.fasta" label="${tool.name} on ${on_string}: Raw scaffolds">
            <filter>'rs' in optional_output</filter>
        </data>
    </xml>
    <xml name="out_b">
        <data name="out_b" format="txt" from_work_dir="output/hmm_statistics.txt" label="${tool.name} on ${on_string}: HMM statistics">
            <filter>'b' in optional_output</filter>
        </data>
    </xml>
    <xml name="out_dg">
        <data name="out_dg" format="fasta" from_work_dir="output/domain_graph.dot" label="${tool.name} on ${on_string}: Domain graph">
            <filter>'dg' in optional_output</filter>
        </data>
    </xml>

    <!-- help tokens unchanged -->
    <token name="@HELP_IN@"><![CDATA[
... (unchanged help text) ...
    ]]></token>
    <token name="@HELP_OUT_AG@">- Assembly graph</token>
    <token name="@HELP_OUT_AGS@">- Assembly graph with scaffolds</token>
    <token name="@HELP_OUT_C@">- Contigs</token>
    <token name="@HELP_OUT_CP@">- Contigs paths in the assembly graph</token>
    <token name="@HELP_OUT_CS@">- Contigs stats</token>
    <token name="@HELP_OUT_CR@">- Corrected reads by BayesHammer</token>
    <token name="@HELP_OUT_L@">- Log file</token>
    <token name="@HELP_OUT_S@">- Scaffolds (recommended for use as resulting sequences)</token>
    <token name="@HELP_OUT_SP@">- Scaffolds paths in the assembly graph</token>
    <token name="@HELP_OUT_SS@">- Scaffolds stats</token>
    <token name="@HELP_WID@">SPAdes - St. Petersburg genome assembler - is an assembly toolkit containing various assembly pipelines.</token>
    <token name="@IONTORRENT@"><![CDATA[
... (unchanged IonTorrent help) ...
    ]]></token>    

</macros>