view bcftools_gtcheck.xml @ 14:64778f8899cc draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit af43d9cf6824f88726900857116f333ff4cdd336"
author iuc
date Sat, 15 Jan 2022 13:43:56 +0000
parents 39810174657a
children a29a2f40b665
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@">
    <description>Check sample identity</description>
    <macros>
        <token name="@EXECUTABLE@">gtcheck</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@
#set $section = $sec_default
#set $genotypes_vcf = None
#if $section.genotypes:
  #if $section.genotypes.is_of_type('vcf')
    #set $genotypes_vcf = 'genotypes.vcf.gz'
    bgzip -c '$section.genotypes' > $genotypes_vcf &&
    bcftools index $genotypes_vcf &&
  #elif $section.genotypes.is_of_type('bcf')
    #set $genotypes_vcf = 'genotypes.bcf'
    ln -s '$ection.genotypes' $genotypes_vcf &&
    #if $section.genotypes.metadata.bcf_index:
      ln -s $section.genotypes.metadata.bcf_index ${genotypes_vcf}.csi &&
    #else
      bcftools index $genotypes_vcf &&
    #end if
  #end if
#end if

bcftools @EXECUTABLE@

## Default section
#set $section = $sec_default

#if $genotypes_vcf:
  --genotypes $genotypes_vcf
#end if

#if $section.genotypes:
  --genotypes '${section.genotypes}'
#end if

${section.all_sites}

#if $section.GTs_only:
  --GTs-only '${section.GTs_only}'
#end if

${section.homs_only}

#if $section.plot:
  --plot '${section.plot}'
#end if

#if $section.query_sample:
  --query-sample '${section.query_sample}'
#end if

#if $section.target_sample:
  --target-sample '${section.target_sample}'
#end if

#set $section = $sec_restrict
@REGIONS@
@TARGETS@

## Primary Input/Outputs

@INPUT_FILE@
> '$output_file'
]]>
    </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" />
        </section>
        <section name="sec_default" expanded="true" title="Default Options">
            <param name="genotypes" type="data" format="vcf,bcf" label="Genotypes to compare against" optional="True"
                   help="(-g) Checks sample identity or wehn omitted a multi-sample cross-check is performed"/>
            <param name="target_sample" type="text" label="Target Sample" optional="True" help="Target sample in the -g file (used only for plotting)" />
            <param name="GTs_only" type="integer" label="Gts Only" value="99" optional="True" help="Use GTs, ignore PLs, using &lt;int&gt; for unseen genotypes" />
            <param name="all_sites" type="boolean" truevalue="--all-sites" falsevalue="" label="All Sites" help="Output comparison for all sites" />
            <param name="homs_only" type="boolean" truevalue="--homs-only" falsevalue="" label="Homs Only" help="Homozygous genotypes only (useful for low coverage data)" />
            <param name="query_sample" type="text" label="Query Sample" optional="True" help="Query sample (by default the first sample is checked)" />
            <param name="plot" type="text" label="Plot" help="Prefix name for plot" />
        </section>
    </inputs>
    <outputs>
        <data name="output_file" format="tabular" />
    </outputs>
    <tests>
        <test>
            <param name="input_file" ftype="vcf" value="view.vcf" />
            <param name="GTs_only" value="99" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="CN\t3\t10\t0\tNA00002\tNA00001"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
=====================================
 bcftools @EXECUTABLE@
=====================================

Check sample identity. With no -g BCF given, multi-sample cross-check is performed.

@REGIONS_HELP@
@TARGETS_HELP@

@BCFTOOLS_MANPAGE@#@EXECUTABLE@

@BCFTOOLS_WIKI@

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