view bcftools_gtcheck.xml @ 18:26d97cdd5410 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit cdb4558db96dd58f9f85267488a1e27ad813fca4
author iuc
date Thu, 29 Sep 2022 09:17:46 +0000
parents a29a2f40b665
children 91c1e57d5c7f
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <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}

${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="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" />
            <output name="output_file">
                <assert_contents>
                    <has_text_matching expression="DC\tNA00002\tNA00001\t6"/>
                </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>