view samtools_phase.xml @ 6:dd8305e4e58e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_phase commit a972815cbd43dea553b3c0e4ad548f35d0023228-dirty
author iuc
date Sun, 28 Jul 2019 14:49:27 -0400
parents 2311187710fb
children 2504000d5158
line wrap: on
line source

<tool id="samtools_phase" name="Call and phase" version="2.0.1">
    <description>heterozygous SNPs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
    samtools phase -b phase_wrapper
        #if str($option_set.option_sets) == 'advanced':
            ${option_set.ignore_chimeras}
            -k $option_set.block_length
            -q $option_set.min_het
            -Q $option_set.min_bq
            -D $option_set.read_depth
            ${option_set.drop_ambiguous}
        #else
            -k 13
            -q 37
            -Q 13
            -D 256
        #end if
        '$input_bam' > '$phase_sets'
    ]]></command>
    <inputs>
        <param format="bam" name="input_bam" type="data" label="Select dataset to phase"/>
        <conditional name="option_set">
            <param name="option_sets" type="select" label="Phase parameters">
                <option value="default">Use defaults</option>
                <option value="advanced">Advanced options</option>
            </param>
            <when value="default" />
            <when value="advanced">
                <param name="block_length" argument="-k" type="integer" value="13" label="Maximum length for local phasing" />
                <param name="min_het" argument="-q" type="integer" value="37" label="Minimum Phred-scaled level of detail to call a heterozygote" />
                <param name="min_bq" argument="-Q" type="integer" value="13" label="Minimum base quality to be used in het calling" />
                <param name="read_depth" argument="-D" type="integer" value="256" label="Read depth" />
                <param name="ignore_chimeras" argument="-F" type="boolean" truevalue="-F" falsevalue="" checked="False" label="Do not attempt to fix chimeric reads" />
                <param name="drop_ambiguous" argument="-A" type="boolean" truevalue="-A" falsevalue="" checked="False" label="Drop reads with ambiguous phase" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="txt" name="phase_sets" />
        <data format="bam" from_work_dir="phase_wrapper.0.bam" name="phase0" label="${tool.name} on ${on_string}: Phase-0 reads" />
        <data format="bam" from_work_dir="phase_wrapper.1.bam" name="phase1" label="${tool.name} on ${on_string}: Phase-1 reads" />
        <data format="bam" from_work_dir="phase_wrapper.chimera.bam" name="chimera" label="${tool.name} on ${on_string}: Chimeric reads" />
    </outputs>
    <tests>
        <test>
            <param name="option_sets" value="default" /> 
            <param name="input_bam" value="samtools_phase_in_1.bam" /> 
            <output name="phase_sets" file="samtools_phase_out_1_log.txt" ftype="txt" />
            <output name="phase0" file="samtools_phase_out_1_phase0.bam" ftype="bam" />
            <output name="phase1" file="samtools_phase_out_1_phase1.bam" ftype="bam" />
            <output name="chimera" file="empty_file.bam" ftype="bam" />
        </test>
        <test>
            <param name="input_bam" value="samtools_phase_in_2.bam" /> 
            <param name="option_sets" value="advanced" /> 
            <param name="option_set|block_length" value="13" />
            <param name="option_set|min_het" value="37" />
            <param name="option_set|min_bq" value="13" />
            <param name="option_set|read_depth" value="256" />
            <param name="option_set|ignore_chimeras" value="false" />
            <param name="option_set|drop_ambiguous" value="true" />
            <output name="phase_sets" file="samtools_phase_out_2_log.txt" ftype="txt" />
            <output name="phase0" file="samtools_phase_out_2_phase0.bam" ftype="bam" />
            <output name="phase1" file="samtools_phase_out_2_phase1.bam" ftype="bam" />
            <output name="chimera" file="samtools_phase_out_2_chimera.bam" />
        </test>
        <test>
            <param name="input_bam" value="samtools_phase_in_2.bam" /> 
            <param name="option_sets" value="advanced" /> 
            <param name="option_set|block_length" value="13" />
            <param name="option_set|min_het" value="37" />
            <param name="option_set|min_bq" value="13" />
            <param name="option_set|read_depth" value="256" />
            <param name="option_set|ignore_chimeras" value="true" />
            <param name="option_set|drop_ambiguous" value="false" />
            <output name="phase_sets" file="samtools_phase_out_3_log.txt" ftype="txt" />
            <output name="phase0" file="samtools_phase_out_3_phase0.bam" ftype="bam" />
            <output name="phase1" file="samtools_phase_out_3_phase1.bam" ftype="bam" />
            <output name="chimera" file="empty_file.bam"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Call and phase heterozygous SNPs.
    ]]></help>
    <expand macro="citations"/>
</tool>