view shovill.xml @ 3:865119fcb694 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/shovill commit 7c14ae1fd4494808cc7be290dab100b828ee6a33
author iuc
date Tue, 13 Nov 2018 10:41:12 -0500
parents f698c7604b3b
children d9f6a00b6db7
line wrap: on
line source

<tool id="shovill" name="Shovill" version="1.0.4">
    <description>Faster SPAdes assembly of Illumina reads</description>
    <requirements>
        <requirement type="package" version="1.0.4">shovill</requirement>
    </requirements>
    <version_command>shovill --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        shovill
            --outdir 'out'
            --cpus \${GALAXY_SLOTS:-1}
            --ram \${SHOVILL_RAM:-4}
            #if str($library.lib_type) == "paired"
                --R1 '$library.R1'
                --R2 '$library.R2'
            #else if str($library.lib_type) == "collection"
                --R1 '$library.input1.forward'
                --R2 '$library.input1.reverse'
            #end if
            $trim
            --namefmt '$adv.namefmt'
            --depth '$adv.depth'
            #if $adv.gsize
                --gsize '$adv.gsize'
            #end if
            #if $adv.kmers
                --kmers '$adv.kmers'
            #end if
            #if $adv.opts
                --opts '$adv.opts'
            #end if
            $adv.nocorr
            --minlen $adv.minlen
            --mincov $adv.mincov
            --assembler $assembler

    ]]></command>
    <inputs>
        <conditional name="library">
            <param name="lib_type" type="select" label="Input reads type, collection or single library" help="Select 'paired end' for a single library or 'collection' for a paired end collection">
                <option value="paired" selected="true">Paired End</option>
                <option value="collection">Paired Collection</option>
            </param>
            <when value="paired">
                <param name="R1" type="data" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2" label="Forward reads (R1)" help="The file of forward reads in FASTQ format"/>
                <param name="R2" type="data" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2" label="Reverse reads (R2)" help="The file of reverse reads in FASTQ format"/>
            </when>
            <when value="collection">
                <param name="input1" format="fastqsanger,fastqsanger.gz,fastqsanger.bz2" type="data_collection" collection_type="paired" label="Paired collection" help="See help section for an explanation of dataset collections"/>
            </when>
        </conditional>
        <param name="trim" argument="--trim" type="boolean" truevalue="--trim" falsevalue="" label="Trim reads" help="Use Trimmomatic to remove common adaptors first (default: OFF)" />
        <param name="log" type="boolean" label="Output log file?" checked="true" help="Return the Shovill log file as part of the output. Default is on" />
        <param name="assembler" argument="--assembler" type="select" label="Assembler to use" help="Which assembler would you like shovill to use, default is Spades">
            <option value="skesa">skesa</option>
            <option value="megahit">megahit</option>
            <option value="velvet">velvet</option>
            <option value="spades" selected="true">Spades</option>
        </param>
        <section name="adv" title="Advanced options" expanded="False">
            <param name="namefmt" argument="--namefmt" type="text" value="contig%05d" label="Contig name format" help="Format of contig FASTA IDs in 'printf' style (default: 'contig%05d')" >
                <sanitizer>
                    <valid initial="string.printable">
                        <remove value="&apos;" />
                    </valid>
                    <mapping initial="none">
                        <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;" />
                    </mapping>
                </sanitizer>
            </param>
            <param name="depth" argument="--depth" type="integer" value="100" label="Depth" help="Sub-sample --R1/--R2 to this depth. Disable with --depth 0 (default: 100)" />
            <param name="gsize" argument="--gsize" type="text" value="" label="Estimated genome size" help="An estimate of the final genome size, it will autodetect if this is blank. (default: '')" />
            <param name="kmers" argument="--kmers" type="text" value="" label="List of kmer sizes to use" help="List of K-mer sizes to use in SPAdes. Blank is AUTO. default: ''" />
            <param name="opts" argument="--opts" type="text" value="" label="Extra SPAdes options" help="eg. --plasmid --sc ... (default: '')" />
            <param name="nocorr" argument="--nocorr" type="boolean" truevalue="--nocorr" falsevalue="" checked="True" label="Disable post-assembly correction" help="Disable post assembly correction with pilon (default: ON)" />
            <param name="minlen" argument="--minlen" type="integer" value="0" label="Minimum contig length" help="Minimum length of contig to be output. 0 is AUTO (default: 0)" />
            <param name="mincov" argument="--mincov" type="integer" value="2" label="Minimum contig coverage" help="Minimum coverage to call part of a contig. 0 is AUTO (default: 2)" />
        </section>
    </inputs>

    <outputs>
        <data name="shovill_std_log" format="txt" label="${tool.name} on ${on_string} Log file" from_work_dir="out/shovill.log" >
            <filter>log</filter>
        </data>
        <data format="fasta" name="contigs" label="${tool.name} on ${on_string}: Contigs" from_work_dir="out/contigs.fa"/>
        <data format="txt" name="contigs_graph" label="${tool.name} on ${on_string}: Contig Graph" from_work_dir="out/contigs.gfa"/>
    </outputs>

    <tests>
        <test> <!-- Test 1: Basic test -->
            <param name="lib_type" value="paired" />
            <param name="R1" value="mutant_R1.fastq" ftype="fastqsanger" />
            <param name="R2" value="mutant_R2.fastq" ftype="fastqsanger" />
            <output name="contigs" ftype="fasta">
                <assert_contents>
                    <has_text text="&gt;contig00001"/>
                </assert_contents>
            </output>
            <output name="shovill_std_log" ftype="txt" >
                <assert_contents>
                    <has_text text="[mash]"/>
                    <has_text text="[lighter] Processed 24960 reads"/>
                    <has_text text="[FLASH] FLASH v1.2.11 complete!"/>
                    <has_text text="[spades] ======= SPAdes pipeline finished."/>
                </assert_contents>
            </output>
        </test>
        <test> <!-- Test 2: Auto everything + trim + different name format test -->
            <param name="lib_type" value="paired" />
            <param name="R1" value="mutant_R1.fastq" ftype="fastqsanger" />
            <param name="R2" value="mutant_R2.fastq" ftype="fastqsanger" />
            <param name="trim" value="true" />
            <section name="adv">
                <param name="depth" value="0"/>
                <param name="minlen" value="0"/>
                <param name="mincov" value="0"/>
                <param name="nocorr" value="false"/>
                <param name="namefmt" value="contig%03d"/>
            </section>
            <output name="contigs" ftype="fasta">
                <assert_contents>
                    <has_text text="&gt;contig001"/>
                </assert_contents>
            </output>
            <output name="shovill_std_log" ftype="txt" >
                <assert_contents>
                    <has_text text="[mash] Writing to"/>
                    <has_text text="[trimmomatic] TrimmomaticPE: Completed successfully"/>
                    <has_text text="[lighter] Processed 24960 reads:"/>
                    <has_text text="[FLASH] FLASH v1.2.11 complete!"/>
                    <has_text text="[spades] ======= SPAdes pipeline finished."/>
                    <has_text text="[bwa+samtools-sort] [samclip] Done."/>
                    <has_text text="[pilon] Mean total coverage:"/>
                    <has_text text="[shovill] Done."/>
                </assert_contents>
            </output>
        </test>
        <test> <!-- Test 3: Alternate assembler #1: Megahit -->
            <param name="lib_type" value="paired" />
            <param name="R1" value="mutant_R1.fastq" ftype="fastqsanger" />
            <param name="R2" value="mutant_R2.fastq" ftype="fastqsanger" />
            <param name="assembler" value="megahit" />
            <output name="contigs" ftype="fasta">
                <assert_contents>
                    <has_text text="&gt;contig00001"/>
                </assert_contents>
            </output>
            <output name="shovill_std_log" ftype="txt" >
                <assert_contents>
                    <has_text text="[mash]"/>
                    <has_text text="[lighter] Processed 24960 reads"/>
                    <has_text text="[FLASH] FLASH v1.2.11 complete!"/>
                    <has_text text="[megahit] --- [STAT]"/>
                </assert_contents>
            </output>
        </test>
        <test> <!-- Test 4: Alternate assembler #2: Skesa -->
            <param name="lib_type" value="paired" />
            <param name="R1" value="mutant_R1.fastq" ftype="fastqsanger" />
            <param name="R2" value="mutant_R2.fastq" ftype="fastqsanger" />
            <param name="assembler" value="skesa" />
            <output name="contigs" ftype="fasta">
                <assert_contents>
                    <has_text text="&gt;contig00001"/>
                </assert_contents>
            </output>
            <output name="shovill_std_log" ftype="txt" >
                <assert_contents>
                    <has_text text="[mash]"/>
                    <has_text text="[lighter] Processed 24960 reads"/>
                    <has_text text="[FLASH] FLASH v1.2.11 complete!"/>
                    <has_text text="[skesa] DONE"/>
                </assert_contents>
            </output>
        </test>
        <test> <!-- Test 5: Alternate assembler #3: Velvet -->
            <param name="lib_type" value="paired" />
            <param name="R1" value="mutant_R1.fastq" ftype="fastqsanger" />
            <param name="R2" value="mutant_R2.fastq" ftype="fastqsanger" />
            <param name="assembler" value="velvet" />
            <output name="contigs" ftype="fasta">
                <assert_contents>
                    <has_text text="&gt;contig00001"/>
                </assert_contents>
            </output>
            <output name="shovill_std_log" ftype="txt" >
                <assert_contents>
                    <has_text text="[mash]"/>
                    <has_text text="[lighter] Processed 24960 reads"/>
                    <has_text text="[FLASH] FLASH v1.2.11 complete!"/>
                    <has_text text="[velvetg] Final graph has"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
Synopsis:
  Faster de novo assembly pipeline for Illumina paired end reads based around Spades

Details and options:
    - Takes paired end Illumina fastq reads
    - Trim reads:   Use Trimmomatic to remove common adaptors first (default: OFF)
    - Output log file:  If set to "Yes", tool will return Shovill's log file as part of the output
    - Assembler:    Which assembler should shovill use from: Skesa, Megahit, Velvet or Spades. Spades is the default.

Advanced options:
    - Name format:          Format of output contig FASTA IDs in 'printf' style (default: 'contig%05d')
    - Depth:                Sub-sample the reads to this depth. Disable with *Depth: 0* (default: 100)
    - Estimated genomesize: An estimate of the final genome size, it will autodetect if this is blank. (default: '')
    - List of kmers to use: List of K-mer sizes to use in SPAdes. Blank is AUTO. (default: '')
    - Extra SPAdes options: Extra SPAdes options eg. --plasmid --sc ... (default: '')
    - Disable post-assembly correction: Disable post assembly correction with pilon (default: ON)
    - Minimum contig length:    Minimum length of contig to be output. 0 is AUTO (default: 0)
    - Minimum contig coverage:  Minimum coverage to call part of a contig. 0 is AUTO (default: 2)
    - Spades result to correct: Spades result to correct: before_rr, contigs or scaffolds (default: 'contigs')

Documentation can be found at Torsten Seemann `site <https://github.com/tseemann/shovill>`_.
    ]]></help>
    <citations>
        <citation type="bibtex">
@UNPUBLISHED{Seemann2017,
    author = {Seemann, Torsten},
    title = {Shovill: Faster SPAdes assembly of Illumina reads},
    year = {2017},
    url = {https://github.com/tseemann/shovill},
}
        </citation>
    </citations>
</tool>