view bcftools_plugin_mendelian.xml @ 17:88bb477f45f7 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 087a38fc2eade9f3a286d672ba61571b0b69a797
author iuc
date Mon, 26 Sep 2022 18:21:43 +0000
parents a8630d4fbaf8
children 8f5962c43868
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<tool name="bcftools @EXECUTABLE@" id="bcftools_plugin_@PLUGIN_ID@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>plugin Count Mendelian consistent / inconsistent genotypes</description>
    <macros>
        <token name="@EXECUTABLE@">mendelian</token>
        <token name="@PLUGIN_ID@">mendelian</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools" />  
    <expand macro="requirements" />
    <expand macro="version_command" />
    <command detect_errors="aggressive"><![CDATA[
@PREPARE_ENV@
@PREPARE_INPUT_FILE@
#set $section = $sec_restrict
@PREPARE_TARGETS_FILE@
@PREPARE_REGIONS_FILE@

bcftools plugin @EXECUTABLE@

## VCF input section
#set $section = $sec_restrict
@INCLUDE@
@EXCLUDE@
@REGIONS@
@TARGETS@

@OUTPUT_TYPE@

## Primary Input/Outputs
@INPUT_FILE@

## Plugin section
#set $section = $sec_plugin
#if $section.trios.trios_src == 'trio':
  --trio "${section.trios.mother},${section.trios.father},${section.trios.child}"
#elif $section.trios.trios_src == 'trio_file':
  --trio-file "$section.trios.trio_file"
#end if
#if $section.mode:
 #set $modes =  str($section.mode).split(',')
 #if 'count' in $modes:
  --count
 #end if
 #if 'delete' in $modes:
  --delete
 #end if
 #if '+' in $modes:
  --list '+'
 #end if
 #if 'x' in $modes:
  --list x
 #end if
#end if
2> tmp_stderr
> '$output_file'
&& cat tmp_stderr
]]>
</command>
    <inputs>
        <expand macro="macro_input" />
        <section name="sec_restrict" expanded="false" title="Restrict to">
            <expand macro="macro_restrict" />
            <expand macro="macro_restrict" type="target" label_type="Target" />
            <expand macro="macro_include" />
            <expand macro="macro_exclude" />
        </section>
        <section name="sec_plugin" expanded="true" title="Plugin Options">
            <!-- trios -->
            <conditional name="trios">
                <param name="trios_src" type="select" label="Sample relationship">
                    <option value="trio">trio - mother,father,child</option>
                    <option value="trio_file">trios file</option>
                </param>
                <when value="trio">
                   <param name="mother" type="text" value="" label="name of mother"/>
                   <param name="father" type="text" value="" label="name of father"/>
                   <param name="child" type="text" value="" label="name of child"/>
                </when>
                <when value="trio_file">
                    <param name="trio_file" type="data" format="txt" label="Trio File" help="List of trios, one per line" />
                </when>
            </conditional>
            <param name="mode" type="select" label="Action" multiple="true" min="1">
                <option value="count">count the number of consistent sites</option>
                <option value="delete">delete inconsistent genotypes (set to './.')</option>
                <option value="+">list consistent sites (+)</option>
                <option value="x">list inconsistent sites (x)</option>
            </param>
        </section>
        <expand macro="macro_select_output_type" />
    </inputs>
    <outputs>
        <expand macro="macro_vcf_output" />
    </outputs>
    <tests>
        <test>
            <!-- This is just a test on a random file, should have a real test case -->
            <param name="input_file" ftype="vcf" value="convert.vcf" />
            <param name="trios_src" value="trio" />
            <param name="mother" value="NA00001" />
            <param name="father" value="NA00002" />
            <param name="child" value="NA00006" />
            <param name="mode" value="delete" />
            <param name="output_type" value="v" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="X\t2698769\t.\tAAG\tA\t999\t.\t.\tGT:PL:GP\t./."/>
                </assert_contents>
            </output>
        </test>
        <test>
            <!-- This is just a test on a random file, should have a real test case -->
            <param name="input_file" ftype="vcf" value="convert.vcf" />
            <param name="trios_src" value="trio" />
            <param name="mother" value="NA00001" />
            <param name="father" value="NA00002" />
            <param name="child" value="NA00006" />
            <param name="mode" value="x" />
            <param name="output_type" value="v" />
            <output name="output_file">
                <assert_contents>
                    <not_has_text text="2698758" />
                    <has_text text="2698769" />
                </assert_contents>
            </output>
        </test>

    </tests>

    <help><![CDATA[
=====================================
 bcftools @EXECUTABLE@ plugin
=====================================

@REGIONS_HELP@
@TARGETS_HELP@
@EXPRESSIONS_HELP@

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