view bcftools_plugin_frameshifts.xml @ 20:2e303fcd3b0c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit bfc4ff4956b94885638ae07a2560bac5f84fcca8
author iuc
date Tue, 16 Jul 2024 17:01:25 +0000
parents 0505a687ac58
children b03c0b3e67a6
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 Annotate frameshift indels</description>
    <macros>
        <token name="@EXECUTABLE@">frameshifts</token>
        <token name="@PLUGIN_ID@">frameshifts</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@
## exons file needs to be bgzip and have tabix index
bgzip -c $exons > exons.bed.gz &&
tabix exons.bed.gz &&

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

@OUTPUT_TYPE@
@THREADS@

## Primary Input/Outputs
@INPUT_FILE@
## Plugin options
-- --exons exons.bed.gz
> '$output_file'
]]>
    </command>
    <inputs>
        <expand macro="macro_input" />
        <param name="exons" type="data" format="bed"
        label="Exons File" help="BED file describing exons" />
        <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>
        <expand macro="macro_select_output_type" />
    </inputs>
    <outputs>
        <expand macro="macro_vcf_output" />
    </outputs>
    <tests>
        <test>
            <param name="input_file" ftype="vcf" value="plugin1.vcf" />
            <param name="exons" ftype="bed" value="plugin_frameshifts.bed" />
            <param name="output_type" value="v" />
            <output name="output_file" ftype="vcf">
                <assert_contents>
                    <has_line_matching expression="##INFO=&lt;ID=OOF,.+" />
                    <has_line_matching expression="1&#09;3106154&#09;.&#09;CAAA&#09;C&#09;.+&#09;.+&#09;OOF=0.+" />
                    <has_line_matching expression="1&#09;3106154&#09;.&#09;C&#09;CT&#09;.+&#09;.+&#09;OOF=1.+" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
=====================================
 bcftools @EXECUTABLE@ plugin
=====================================

A simple tool to annotate the effect of indel variants.

Adds an ``OOF`` (out-of-frame) subfield to the ``INFO`` field of indel records
found in the input, where

- ``OOF=1`` indicates that the indel results in a frameshift
- ``OOF=0`` indicates an in-frame indel

The information about indel effects is extracted from the ``BED`` input, which
is supposed to describe the reference genome exons.

If a variant record lists several ``ALT`` alleles, some of them indels, then
``OOF`` will be a comma-separated list of status indicators. In the list a
third ``OOF`` status code of ``-1`` will be used to indicate ``ALT`` alleles
that are not associated with a change in sequence length or that don't affect
an exon.

The formal definition (added to the VCF header) of the ``OOF`` subfield is::

  INFO=<ID=OOF,Number=A,Type=Integer,Description="Frameshift Indels: out-of-frame (1), in-frame (0), not-applicable (-1 or missing)">

@REGIONS_HELP@
@TARGETS_HELP@
@EXPRESSIONS_HELP@

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