view consensus.xml @ 4:84dcccebad3d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit e80b649094384fc6d7a8f917300db3550cc99a44"
author iuc
date Tue, 01 Sep 2020 03:07:44 -0400
parents 12c40c8c86db
children 5901bb391198
line wrap: on
line source

<tool id="medaka_consensus" name="medaka: Consensus" version="@TOOL_VERSION@+galaxy2" 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[
## initialize
ln -s '${bam}' alignment.bam &&
ln -s '${bam.metadata.bam_index}' alignment.bam.bai &&

## run
medaka consensus
## optional
--debug ## increase log level
--threads \${GALAXY_SLOTS:-4}
--batch_size $batch_size
#if $regions_cond.regions_sel == 'custom' or $regions_cond.regions_sel == 'bed'
    --regions
    #if $regions_cond.regions_sel == 'custom'
        '$regions_cond.custom'
    #else if $regions_cond.regions_sel == 'bed'
        '$regions_cond.bed'
    #end if
#end if
--chunk_len $chunk_len
--chunk_ovlp $chunk_ovlp
--model $model
$disable_cudnn
$check_output
$save_features
#if $RG
    --RG '$RG'
#end if
#if $tag_name
    --tag_name '$tag_name'
#end if
#if str($tag_value):
    --tag_value $tag_value
#end if
$tag_keep_missing
## required
alignment.bam ## bam
'$out_result' ## output

2>&1 | tee '$out_log'
    ]]></command>
    <inputs>
        <param argument="bam" type="data" format="bam" label="Select input alignment"/>
        <expand macro="model" argument="--model"/>
        <expand macro="b" argument="--batch_size"/>
        <conditional name="regions_cond">
            <param name="regions_sel" type="select" label="Specify regions to analyse via">
                <option value="none">None</option>
                <option value="custom">Custom input</option>
                <option value="bed">BED file</option>
            </param>
            <when value="none"/>
            <when value="custom">
                <param argument="custom" type="text" value="" label="Set genomic regions to analyse"/>
            </when>
            <when value="bed">
                <param argument="bed" type="data" format="bed" label="Select file with genomic regions to analyse"/>
            </when>
        </conditional>
        <param argument="--chunk_len" type="integer" value="10000" label="Set chunk length of samples"/>
        <param argument="--chunk_ovlp" type="integer" value="1000" label="Set overlap of chunks"/>
        <param argument="--disable_cudnn" type="boolean" truevalue="--disable_cudnn" falsevalue="" label="Disable use of cuDNN model layers?"/>
        <param argument="--check_output" type="boolean" truevalue="--check_output" falsevalue="" label="Verify integrity of output file after inference?"/>
        <param argument="--save_features" type="boolean" truevalue="--save_features" falsevalue="" label="Save features with consensus?"/>
        <param argument="--RG" type="text" value="" optional="true" label="Set read group"/>
        <param argument="--tag_name" type="text" value="" optional="true" label="Set tag name" help="Two letters."/>
        <param argument="--tag_value" type="integer" value="" optional="true" label="Set tag value"/>
        <param argument="--tag_keep_missing" type="boolean" truevalue="--tag_keep_missing" falsevalue="" label="Keep alignments when tag is missing?"/>
        <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)">
            <option value="result" selected="true">Result</option>
            <option value="log">Log</option>
        </param>
    </inputs>
    <outputs>
        <!-- standard -->
        <data name="out_result" format="h5" label="${tool.name} on ${on_string}: Result">
            <filter>'result' 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="1">
            <param name="bam" value="alignment.bam"/>
            <output name="out_result">
                <assert_contents>
                    <has_size value="32624"/>
                </assert_contents>
            </output>
        </test>
        <!-- #2 -->
        <test expect_num_outputs="2">
            <param name="bam" value="alignment.bam"/>
            <param name="model" value="r941_min_fast_g303"/>
            <param name="batch_size" value="99"/>
            <param name="chunk_len" value="9999"/>
            <param name="chunk_ovlp" value="999"/>
            <param name="disable_cudnn" value="true"/>
            <param name="check_output" value="true"/>
            <param name="save_features" value="true"/>
            <param name="tag_keep_missing" value="true"/>
            <param name="out" value="result,log"/>
            <output name="out_result">
                <assert_contents>
                    <has_size value="38400"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_text_matching expression=".+Validating and finalising output data."/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

The module *consensus* runs inference from a trained model and alignments.

**Input**

Alignment (BAM)

**Output**

Results (H5/HDF)

**References**

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