view medaka_consensus.xml @ 10:1ca4ce7241fd draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit 0faf0ade3f13d7c78d93869823ea9fdf25c21b13"
author iuc
date Thu, 22 Apr 2021 20:25:13 +0000
parents a1b70f038b4a
children 8dfe8a52346f
line wrap: on
line source

<tool id="medaka_consensus_pipeline" name="medaka consensus pipeline" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
    <description>Assembly polishing via neural networks</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
medaka_consensus
## optional
-m ${m}
-b $b
-o results
-t \${GALAXY_SLOTS:-4}
## required
-i '$i'
-d '$d'

2>&1 | tee '$out_log'
    ]]></command>
    <inputs>
        <param argument="-i" type="data" format="fastq,fastq.gz,fastqsanger,fastqsanger.gz,fasta,fasta.gz" label="Select basecalls"/>
        <param argument="-d" type="data" format="fasta,fasta.gz" label="Select assembly" help="The input assembly should be preprocessed with racon."/>
        <expand macro="model"/>
        <expand macro="b"/>
        <param argument="-g" type="boolean" truevalue="-g" falsevalue="" label="Don't fill gaps in consensus with draft sequence?" checked="false" />
        <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)" help="'Draft To Consensus', 'Variants' and 'Polished regions in draft coordinates' are generated using the parameter -v.">
            <option value="consensus" selected="true">Consensus</option>
            <option value="probs" selected="true">Consensus probabilities</option>
            <option value="calls" selected="true">Calls to draft</option>
            <option value="log">Log</option>
            <option value="gaps">Gap regions in draft</option>
        </param>
    </inputs>
    <outputs>
        <!-- standard -->
        <data name="out_consensus" format="fasta" from_work_dir="results/consensus.fasta" label="${tool.name} on ${on_string}: Consensus">
            <filter>'consensus' in out</filter>
        </data>
        <data name="out_probs" format="h5" from_work_dir="results/consensus_probs.hdf" label="${tool.name} on ${on_string}: Consensus probabilities">
            <filter>'probs' in out</filter>
        </data>
        <data name="out_calls" format="bam" from_work_dir="results/calls_to_draft.bam" label="${tool.name} on ${on_string}: Calls to draft">
            <filter>'calls' in out</filter>
        </data>
        <data name="out_gaps" format="bed" from_work_dir="results/consensus.fasta.gaps_in_draft_coords.bed" label="${tool.name} on ${on_string}: Gaps in draft">
            <filter>'gaps' in out</filter>
        </data>
        <!-- optional -->
        <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log">
            <filter>'log' in out</filter>
        </data>
    </outputs>
    <tests>
        <!-- #1 default -->
        <test expect_num_outputs="3">
            <param name="i" value="basecalls.fastq"/>
            <param name="d" value="assembly.fasta"/>
            <output name="out_consensus">
                <assert_contents>
                    <has_n_lines n="2"/>
                    <has_line line=">4"/>
                    <has_text_matching expression=".+GTCAGAATCGCGTTCAGCGCGTTTCAGCGGTGCGTACAATT.+"/>
                </assert_contents>
            </output>
            <output name="out_probs">
                <assert_contents>
                    <has_size value="165503" delta="100"/>
                </assert_contents>
            </output>
            <output name="out_calls">
                <assert_contents>
                    <has_size value="343197" delta="100"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 -->
        <test expect_num_outputs="5">
            <param name="i" value="basecalls.fastq"/>
            <param name="d" value="assembly.fasta"/>
            <param name="m" value="r941_min_fast_g303"/>
            <param name="b" value="99"/>
            <param name="out" value="consensus,probs,calls,log,gaps"/>
            <output name="out_consensus">
                <assert_contents>
                    <has_n_lines n="2"/>
                    <has_line line=">4"/> <!-- Replace test -->
                </assert_contents>
            </output>
            <output name="out_probs">
                <assert_contents>
                    <has_size value="166251" delta="100"/>
                </assert_contents>
            </output>
            <output name="out_calls">
                <assert_contents>
                    <has_size value="343197" delta="100"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_line line="Polished assembly written to results/consensus.fasta, have a nice day."/>
                </assert_contents>
            </output>
            <output name="out_gaps">
                <assert_contents>
                    <has_size value="0" delta="0"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

The *medaka_consensus* pipeline performs assembly polishing via neural networks.

**Input**

An *assembly* in .fasta format and *basecalls* in .fasta or .fastq format are required. See `Creating a Draft Assembly  <https://nanoporetech.github.io/medaka/walkthrough.html#basecalling-and-draft-assembly>`_ for a detailed example of one method of obtaining these.

**Output**

- Consensus polished assembly (FASTA)
- Consensus Probabilities (H5/HDF)
- Calls To Draft (BAM)
- Draft To Consensus (chain, TXT)
- Variants: VCF of changes (VCF)
- Polished: BED file of polished regions (BED)

**References**

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