view metaplasmidspades.xml @ 9:7e27faaad80e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit f53f7f297e551bf58e753752edd0dae5205bbc77
author iuc
date Mon, 15 Apr 2024 19:39:12 +0000
parents 037f9927c4ff
children
line wrap: on
line source

<tool id="spades_metaplasmidspades" name="metaplasmidSPAdes" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description>extract and assembly plasmids from metagenomic data</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">metaplasmidspades</xref>
    </xrefs>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[

#set $library = 1

@PREPROCESS_INPUT_FILES_MAIN@
#if $additional_reads.selector == 'true'
    @PREPROCESS_INPUT_FILES_ADDITIONAL@
#end if
@PREPROCESS_NANOPORE_PACBIO_FILES@
@PREPROCESS_SANGER_FILES@
@PREPROCESS_CONTIGS_FILES@
@PREPROCESS_ASSEMBLY_GRAPH_FILES@

@OMP_THREADS@
## run
spades.py --meta --plasmid
    $operation_mode
    -o 'output'
    @RESOURCES@
    @INPUT_READS_MAIN@
    #if $additional_reads.selector == 'true'
        @INPUT_READS_ADDITIONAL@
    #end if
    ## reads
    @NANOPORE_PACBIO@
    @SANGER@
    @CONTIGS@
    @ASSEMBLY_GRAPH@
    ## parameter
    @KMER@
    @PHREDOFFSET@
    @PIPELINE_OPTIONS@
    ## postprocessing
    @STATS@
    @CORRECTED@
    ]]></command>
    <inputs>
        <expand macro="operation_mode" help="To run read error correction, reads should be in FASTQ format."/>
        <expand macro="input_files_paired" format="fastq, fastq.gz,fastqsanger.gz" label="FASTQ file(s)"/>
        <expand macro="input_additional_files_paired" format="fastq,fastq.gz,fastqsanger.gz" label="FASTQ file(s)"/>
        <section name="arf" title="Additional read files">
            <expand macro="nanopore_pacbio"/>
            <expand macro="sanger"/>
            <expand macro="contigs"/>
            <expand macro="assembly_graph"/>
        </section>
        <expand macro="kmer"/>
        <expand macro="phred"/>
        <expand macro="pipeline_options">
            <option value="--careful">Careful: ties to reduce the number of mismatches and short indels. Only recommended for small genomes (--careful)</option>
            <option value="--iontorrent">Iontorrent: required when assembling IonTorrent data (--iontorrent)</option>
        </expand>
        <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="cn" selected="true">Contigs</option>
            <option value="cs">Contigs stats</option>
            <option value="cr">Corrected reads</option>
            <option value="sc" selected="true">Scaffolds</option>
            <option value="ss">Scaffolds stats</option>
            <option value="l">Log</option>
        </param>
    </inputs>
    <outputs>
        <expand macro="out_cn"/>
        <expand macro="out_cr"/>
        <expand macro="out_cs"/>
        <expand macro="out_l"/>
        <expand macro="out_sc"/>
        <expand macro="out_ss"/>
   </outputs>
    <tests>
        <!--
        used in a test:
            multiple libraries: s, pe#-12, pe#-1, pe#-2, pe#-<or>
            k, phred-offset, disablerr, iontorrent, only-assembler, only-error-correction
        -->

        <!-- #1 single, separate, fastq.gz, default parameters -->
         <test expect_num_outputs="2">
            <conditional name="singlePaired">
                <param name="sPaired" value="paired"/>
                <param name="input1" value="pl1.fq.gz"/>
                <param name="input2" value="pl2.fq.gz"/>
            </conditional>
            <output name="out_cn">
                <assert_contents>
                    <has_n_lines n="163"/>
                    <has_text_matching expression=">NODE\_1\_length\_9689\_cov\_.+"/>
                </assert_contents>
            </output>
            <output name="out_sc">
                <assert_contents>
                    <has_n_lines n="163"/>
                    <has_text_matching expression=">NODE\_1\_length\_9689.+"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 single, separate, fastq, custom parameters -->
        <test expect_num_outputs="6">
            <conditional name="singlePaired">
                <param name="sPaired" value="paired"/>
                <param name="input1" value="pl1.fq.gz"/>
                <param name="input2" value="pl2.fq.gz"/>
            </conditional>
            <conditional name="kmer_cond">
                <param name="kmer_sel" value="manual"/>
                <param name="manual" value="33"/>
            </conditional>
            <param name="phred_offset" value="33"/>
            <param name="optional_output" value="cn,cs,cr,sc,ss,l"/>
            <output name="out_cn">
                <assert_contents>
                    <has_n_lines n="162"/>
                    <has_text_matching expression=">NODE\_1\_length\_9645\_cov\_.+"/>
                </assert_contents>
            </output>
            <output name="out_cs">
                <assert_contents>
                    <has_n_lines n="2"/>
                    <has_text_matching expression="#name&#009;length&#009;coverage"/>
                    <has_text_matching expression="NODE_1&#009;9645&#009;13.774865_cutoff_0_type_circular"/>
                </assert_contents>
            </output>
            <output_collection name="out_cr" type="list" count="3">
                <element name="pl1.fq.gz.fastq.00.0_0">
                    <assert_contents>
                        <has_size value="71752" delta="1000"/>
                    </assert_contents>
                </element>
                <element name="pl2.fq.gz.fastq.00.0_0">
                    <assert_contents>
                        <has_size value="71752" delta="1000"/>
                    </assert_contents>
                </element>
                <element name="pl_unpaired.00.0_0">
                    <assert_contents>
                        <has_size value="423" delta="100"/>
                    </assert_contents>
                </element>
            </output_collection>
            <output name="out_sc">
                <assert_contents>
                    <has_n_lines n="162"/>
                    <has_text_matching expression=">NODE\_1\_length\_9645\_cov\_.+"/>
                </assert_contents>
            </output>
            <output name="out_ss">
                <assert_contents>
                    <has_n_lines n="2"/>
                    <has_text_matching expression="#name&#009;length&#009;coverage"/>
                    <has_text_matching expression="NODE_1&#009;9645&#009;13.774865_cutoff_0_type_circula"/>
                </assert_contents>
            </output>
            <output name="out_l">
                <assert_contents>
                    <has_text_matching expression="Thank you for using SPAdes!"/>
                </assert_contents>
            </output>
        </test>
        <!-- #3 -->
        <test expect_num_outputs="1">
            <conditional name="singlePaired">
                <param name="sPaired" value="paired"/>
                <param name="input1" value="pl1.fq.gz"/>
                <param name="input2" value="pl2.fq.gz"/>
            </conditional>
            <param name="operation_mode" value="--only-assembler"/>
            <param name="optional_output" value="l"/>
            <output name="out_l">
                <assert_contents>
                    <has_text_matching expression="Thank you for using SPAdes!"/>
                </assert_contents>
            </output>
        </test>
        <!-- #4, only corrected reads are created as an output -->
        <test expect_num_outputs="2">
            <conditional name="singlePaired">
                <param name="sPaired" value="paired"/>
                <param name="input1" value="pl1.fq.gz"/>
                <param name="input2" value="pl2.fq.gz"/>
            </conditional>
            <param name="operation_mode" value="--only-error-correction"/>
            <param name="optional_output" value="cr,l"/>
            <output_collection name="out_cr" type="list" count="3">
                <element name="pl1.fq.gz.fastq.00.0_0">
                    <assert_contents>
                        <has_size value="71752" delta="1000"/>
                    </assert_contents>
                </element>
                <element name="pl2.fq.gz.fastq.00.0_0">
                    <assert_contents>
                        <has_size value="71752" delta="1000"/>
                    </assert_contents>
                </element>
                <element name="pl_unpaired.00.0_0">
                    <assert_contents>
                        <has_size value="423" delta="100"/>
                    </assert_contents>
                </element>
            </output_collection>
            <output name="out_l">
                <assert_contents>
                    <has_text_matching expression="Thank you for using SPAdes!"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@HELP_WID@

metaplasmidSPAdes is a subtool for assembling plasmids from metagenomic data sets.

**Input**

@HELP_IN@

**Output**

@HELP_OUT_C@
@HELP_OUT_CS@
@HELP_OUT_CR@
@HELP_OUT_L@
@HELP_OUT_S@
@HELP_OUT_SS@

**References**

More information can be found on `github <https://github.com/ablab/spades>`_.
    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1101/gr.241299.118</citation>
    </expand>
</tool>