view flye.xml @ 4:3ee0ef312022 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/flye commit 1143ac8397d6fefb3f18d33bb752ee3f13c072d6"
author bgruening
date Wed, 05 Feb 2020 19:37:18 -0500
parents 1ce9b1d72ec3
children de24438c9988
line wrap: on
line source

<tool id="flye" name="Flye assembly" version="2.6">
    <description>of long and error-prone reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <version_command>flye --version</version_command>
    <command detect_errors="exit_code">
    <![CDATA[

    #for $counter, $input in enumerate($inputs):

        #if $input.is_of_type('fastqsanger', 'fastq'):
            #set $ext = 'fastq'
        #elif $input.is_of_type('fastqsanger.gz'):
            #set $ext = 'fastq.gz'
        #elif $input.is_of_type('fasta.gz'):
            #set $ext = 'fasta.gz'
        #elif $input.is_of_type('fasta'):
            #set $ext = 'fasta'
        #end if
        ln -s '$input' ./input_${counter}.${ext} &&
    #end for

    flye
    $mode
    #for $counter, $input in enumerate($inputs):
        ./input_${counter}.$ext
    #end for

    -o out_dir
    -g '$g'
    -t \${GALAXY_SLOTS:-4}
    -i $i
    #if $m:
        -m '$m'
    #end if
    #if $asm:
        --asm-coverage '$asm'
    #end if
    ${plasmids}
    ${meta}
    ${no_trestle}
    2>&1
    ]]></command>
    <inputs>
        <param name="inputs" type="data" format="fasta,fasta.gz,fastq,fastq.gz,fastqsanger.gz,fastqsanger" multiple="true" label="Input reads" />
        <param name="mode" type="select" label="Mode">
            <option value="--nano-raw">Nanopore raw</option>
            <option value="--nano-corr">Nanopore corrected</option>
            <option value="--pacbio-raw">PacBio raw</option>
            <option value="--pacbio-corr">PacBio corrected</option>
            <option value="--subassemblies">high-quality contig-like input</option>
        </param>
        <param argument="-g" type="text" label="estimated genome size (for example, 5m or 2.6g)">
            <validator type="regex" message="Genome size must be a float  or integer, optionally followed by the a unit prefix (kmg)">^([0-9]*[.])?[0-9]+[kmg]?$</validator>
        </param>
        <param argument="-i" type="integer" value="1" label="number of polishing iterations" />
        <param argument="-m" type="integer" optional="true" label="minimum overlap between reads (default: auto)" />
        <param name="asm" argument="--asm-coverage" type="integer" optional="true" label="reduced coverage for initial disjointing assembly" />
        <param argument="--plasmids" type="boolean" truevalue="--plasmids" falsevalue="" checked="False" label="rescue short unassembled plasmids" />
        <param argument="--meta" type="boolean" truevalue="--meta" falsevalue="" checked="False" label="perform metagenomic assembly" />
        <param name="no_trestle" argument="--no-trestle" type="boolean" truevalue="--no-trestle" falsevalue="" checked="False" label="skip trestle stage" />
    </inputs>
    <outputs>
        <data name="consensus" format="fasta" from_work_dir="out_dir/assembly.fasta" label="${tool.name} on ${on_string} (consensus)"/>
        <data name="assembly_graph" format="graph_dot" from_work_dir="out_dir/assembly_graph.gv" label="${tool.name} on ${on_string} (assembly_graph)"/>
        <data name="assembly_gfa" format="txt" from_work_dir="out_dir/assembly_graph.gfa" label="${tool.name} on ${on_string} (Graphical Fragment Assembly)"/>
        <data name="assembly_info" format="tabular" from_work_dir="out_dir/assembly_info.txt" label="${tool.name} on ${on_string} (assembly_info)"/>
        <data name="flye_log" format="txt" from_work_dir="out_dir/flye.log" label="${tool.name} on ${on_string} (log)"/>
    </outputs>
    <tests>
        <test>
            <param name="inputs" ftype="fasta" value="nanopore.fasta"/>
            <param name="mode" value="--pacbio-raw"/>
            <param name="g" value="10000"/>
            <output name="assembly_info" file="result1_assembly_info.txt" ftype="tabular" compare="sim_size"/>
            <output name="assembly_graph" file="result1_assembly_graph.dot" ftype="graph_dot" compare="sim_size"/>
            <output name="assembly_gfa" file="result1_assembly_graph.gfa" ftype="txt" compare="sim_size"/>
            <output name="consensus" file="result1_assembly.fasta" ftype="fasta" compare="sim_size"/>
        </test>
        <test>
            <param name="inputs" ftype="fasta" value="nanopore.fasta"/>
            <param name="mode" value="--nano-raw"/>
            <param name="g" value="10000"/>
            <output name="assembly_info" file="result2_assembly_info.txt" ftype="tabular" compare="sim_size"/>
            <output name="assembly_graph" file="result2_assembly_graph.dot" ftype="graph_dot" compare="sim_size"/>
            <output name="assembly_gfa" file="result2_assembly_graph.gfa" ftype="txt" compare="sim_size"/>
            <output name="consensus" file="result2_assembly.fasta" ftype="fasta" compare="sim_size"/>
        </test>
        <test>
            <param name="inputs" ftype="fasta" value="nanopore.fasta"/>
            <param name="mode" value="--nano-corr"/>
            <param name="g" value="10000"/>
            <param name="i" value="2"/>
            <param name="asm" value="40"/>
            <output name="assembly_info" file="result3_assembly_info.txt" ftype="tabular" compare="sim_size"/>
            <output name="assembly_graph" file="result3_assembly_graph.dot" ftype="graph_dot" compare="sim_size"/>
            <output name="assembly_gfa" file="result3_assembly_graph.gfa" ftype="txt" compare="sim_size"/>
            <output name="consensus" file="result3_assembly.fasta" ftype="fasta" compare="sim_size"/>
        </test>
        <test>
            <param name="inputs" ftype="fasta" value="nanopore.fasta"/>
            <param name="mode" value="--pacbio-raw"/>
            <param name="g" value="10000"/>
            <param name="i" value="1"/>
            <param name="meta" value="true"/>
            <param name="plasmids" value="true"/>
            <param name="no-trestle" value="true"/>
            <output name="assembly_info" file="result4_assembly_info.txt" ftype="tabular" compare="sim_size"/>
            <output name="assembly_graph" file="result4_assembly_graph.dot" ftype="graph_dot" compare="sim_size"/>
            <output name="assembly_gfa" file="result4_assembly_graph.gfa" ftype="txt" compare="sim_size"/>
            <output name="consensus" file="result4_assembly.fasta" ftype="fasta" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[

Input reads could be in FASTA or FASTQ format, uncompressed
or compressed with gz. Currenlty, raw and corrected reads
from PacBio and ONT are supported. The expected error rates are
<30% for raw and <2% for corrected reads. Additionally,
--subassemblies option performs a consensus assembly of multiple
sets of high-quality contigs. You may specify multiple
files with reads (separated by spaces). Mixing different read
types is not yet supported.

You must provide an estimate of the genome size as input,
which is used for solid k-mers selection. The estimate could
be rough (e.g. withing 0.5x-2x range) and does not affect
the other assembly stages. Standard size modificators are
supported (e.g. 5m or 2.6g).

    ]]></help>
    <expand macro="citations" />
</tool>