view medaka_variant.xml @ 9:336b3def9b2b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit 2a29f6676b1bbf42e9c4c3edeb4471a0ac57fbe3"
author iuc
date Mon, 29 Mar 2021 20:06:01 +0000
parents 5c959a2dde5f
children 7623e5888be9
line wrap: on
line source

<tool id="medaka_variant_pipeline" name="medaka variant pipeline" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
    <description>via neural networks</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
## initialize
@REF_FASTA@
## link doesn't work
cp '${i}' alignment.bam &&
cp '${i.metadata.bam_index}' alignment.bam.bai &&

## run
medaka_variant
## optional
#if $r:
    -r '$r'
#end if
-o results
-s $s
-m $m
-t \${GALAXY_SLOTS:-4}
-p
-b $b
-N $N
-P $P
$U
$S
## required
-i alignment.bam
-f reference.fa

2>&1 | tee '$out_log'
    ]]></command>
    <inputs>
        <param argument="-i" type="data" format="bam" label="Select input reads" help="Read groups are currently ignored, so the bam should only contain reads from a single sample."/>
        <expand macro="reference"/>
        <param argument="-r" type="text" value="" optional="true" label="Set region string(s)" help="If not provided, will process all contigs."/>
        <expand macro="model" argument="-s" label="Select model for initial SNP calling from mixed reads prior to phasing"/>
        <expand macro="model" argument="-m" label="Select model for final variant calling from phased reads"/>
        <expand macro="b"/>
        <param argument="-N" type="integer" value="14" label="Set threshold for filtering indels in final VCF"/>
        <param argument="-P" type="integer" value="12" label="Set threshold for filtering SNPs in final VCF"/>
        <param argument="-U" type="boolean" truevalue="-U" falsevalue="" label="Avoid filtering of final VCF?"/>
        <param argument="-S" type="boolean" truevalue="-S" falsevalue="" label="Stop after initial SNP calling from mixed reads prior to phasing?"/>
        <param name="out" type="select" multiple="true" optional="false" label="Select out file(s)5">
            <option value="round_0_hap_mixed_phased_bam">round_0_hap_mixed_phased.bam</option>
            <option value="round_0_hap_mixed_phased_vcf">round_0_hap_mixed_phased.vcf</option>
            <option value="round_0_hap_mixed_probs_hdf">round_0_hap_mixed_probs.hdf</option>
            <option value="round_0_hap_mixed_unphased_vcf">round_0_hap_mixed_unphased.vcf</option>
            <option value="round_1_hap_1_vcf">round_1_hap_1.vcf</option>
            <option value="round_1_hap_2_vcf">round_1_hap_2.vcf</option>
            <option value="round_1_hap_1_probs_hdf">round_1_hap_1_probs.hdf</option>
            <option value="round_1_hap_2_probs_hdf">round_1_hap_2_probs.hdf</option>
            <option value="round_1_phased.vcf">round_1_phased.vcf</option>
            <option value="round_1_unfiltered_vcf">round_1_unfiltered.vcf</option>
            <option value="round_1_vcf" selected="true">round_1.vcf</option>
            <option value="log">Log</option>
        </param>
    </inputs>
    <outputs>
        <!-- standard output-->
        <data name="out_round_1_vcf" format="vcf" label="${tool.name} on ${on_string}: round_1.vcf" from_work_dir="results/round_1.vcf">
            <filter>'round_1_vcf' in out</filter>
        </data>
        <!-- optional output: round 0 -->
        <data name="out_round_0_hap_mixed_probs_hdf" format="h5" label="${tool.name} on ${on_string}: round_0_hap_mixed_probs_hdf" from_work_dir="results/round_0_hap_mixed_probs.hdf">
            <filter>'round_0_hap_mixed_probs_hdf' in out</filter>
        </data>
        <data name="out_round_0_hap_mixed_phased_bam" format="bam" label="${tool.name} on ${on_string}: round_0_hap_mixed_phased_bam" from_work_dir="results/round_0_hap_mixed_phased.bam">
            <filter>'round_0_hap_mixed_phased_bam' in out</filter>
        </data>
        <data name="out_round_0_hap_mixed_phased_vcf" format="vcf" label="${tool.name} on ${on_string}: round_0_hap_mixed_phased_vcf" from_work_dir="results/round_0_hap_mixed_phased.vcf">
            <filter>'round_0_hap_mixed_phased_vcf' in out</filter>
        </data>
        <data name="out_round_0_hap_mixed_unphased_vcf" format="vcf" label="${tool.name} on ${on_string}: round_0_hap_mixed_unphased_vcf" from_work_dir="results/round_0_hap_mixed_unphased.vcf">
            <filter>'round_0_hap_mixed_unphased_vcf' in out</filter>
        </data>
        <!-- optional output: round 1 -->
        <data name="out_round_1_hap_1_vcf" format="vcf" label="${tool.name} on ${on_string}: round_1_hap_1.vcf" from_work_dir="results/round_1_hap_1.vcf">
            <filter>'round_1_hap_1_vcf' in out</filter>
        </data>
        <data name="out_round_1_hap_1_probs_hdf" format="h5" label="${tool.name} on ${on_string}: round_1_hap_1_probs.hdf" from_work_dir="results/round_1_hap_1_probs.hdf">
            <filter>'round_1_hap_1_probs_hdf' in out</filter>
        </data>
        <data name="out_round_1_hap_2_vcf" format="vcf" label="${tool.name} on ${on_string}: round_1_hap_2.vcf" from_work_dir="results/round_1_hap_2.vcf">
            <filter>'round_1_hap_2_vcf' in out</filter>
        </data>
        <data name="out_round_1_hap_2_probs_hdf" format="h5" label="${tool.name} on ${on_string}: round_1_hap_2_probs.hdf" from_work_dir="results/round_1_hap_2_probs.hdf">
            <filter>'round_1_hap_2_probs_hdf' in out</filter>
        </data>
        <data name="out_round_1_phased.vcf" format="vcf" label="${tool.name} on ${on_string}: round_1_phased.vcf" from_work_dir="results/round_1_phased.vcf">
            <filter>'round_1_phased.vcf' in out</filter>
        </data>
        <data name="out_round_1_unfiltered_vcf" format="vcf" label="${tool.name} on ${on_string}: round_1_unfiltered.vcf" from_work_dir="results/round_1_unfiltered.vcf">
            <filter>'round_1_unfiltered_vcf' in out</filter>
        </data>
        <!-- optional output: log -->
        <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log">
            <filter>'log' in out</filter>
        </data>
    </outputs>
    <tests>
        <!-- #1 default -->
        <test>
            <param name="i" value="alignment.bam"/>
            <conditional name="reference_source">
                <param name="reference_source_selector" value="cached"/>
                <param name="ref_file" value="bwa-mem-mt-genome"/>
            </conditional>
            <param name="out" value="round_0_hap_mixed_probs.hdf,round_0_hap_mixed_unphased.vcf,log"/>
            <output name="out_round_0_hap_mixed_unphased_vcf">
                <assert_contents>
                    <has_n_lines n="6"/>
                    <has_line line="##fileformat=VCFv4.1"/>
                </assert_contents>
            </output>
            <output name="out_round_0_hap_mixed_probs_hdf">
                <assert_contents>
                    <has_size value="32624"/>
                </assert_contents>
            </output>
            <output name="out_log">
                <assert_contents>
                    <has_line line="++ Preparing data"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

@WID@

The module *medaka_variant* performs a variant calling via neural networks.

**Input**

It is unlikely that the model arguments should be changed from their defaults.

- reads aligned to reference (BAM), should be aligned to the reference against which to call variants
- reference (FASTA)

**Output**

- round_0_hap_mixed_phased.bam
- round_0_hap_mixed_phased.vcf
- round_0_hap_mixed_probs.hdf
- round_0_hap_mixed_unphased.vcf
- round_1_hap_1_probs.hdf
- round_1_hap_1.vcf
- round_1_hap_2_probs.hdf
- round_1_hap_2.vcf
- round_1_phased.vcf
- round_1_unfiltered.vcf
- round_1.vcf
- log

**References**

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