view snpSift_rmInfo.xml @ 0:9e8280e19338 draft

Uploaded
author iuc
date Thu, 22 Jan 2015 08:39:07 -0500
parents
children 98708b88af9f
line wrap: on
line source

<tool id="snpSift_rmInfo" name="SnpSift rmInfo" version="4.0.0">
    <description>remove INFO field annotations</description>
    <expand macro="requirements" />
    <macros>
        <import>snpSift_macros.xml</import>
    </macros>
    <command>
      java -Xmx2G -jar \$SNPEFF_JAR_PATH/SnpSift.jar rmInfo $input ' '.join($info_fields.split(',')) > $output
    </command>
    <inputs>
        <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/>
        <param name="info_fields" type="text" value="" label="Info fields to remove, e.g. EFF">
          <help>Separate multiple INFO fields with a comma, e.g.: EFF,DP</help>
          <validator type="empty_field" />
        </param>
    </inputs>
    <outputs>
        <data format="vcf" name="output" />
    </outputs>
    <expand macro="stdio" />
    <tests>
        <test>
            <param name="input" ftype="vcf" value="test-data/test_rmInfo.vcf"/>
            <param name="info_fields" value="EFF"/>
            <output name="output">
                <assert_contents>
                    <has_text text="DP=29" />
                    <not_has_text text="EFF=EXON" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="input" ftype="vcf" value="test-data/test_rmInfo.vcf"/>
            <param name="info_fields" value="EFF"/>
            <output name="output">
                <assert_contents>
                    <not_has_text text="DP=29;EFF=EXON" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
This command removes INFO fields from a VCF file (i.e. removes annotations)

Removing INFO fields is usually done because you want to re-annotate the VCF file, thus removing old INFO fields in order to add new ones later. 

SnpEff &amp; SnpSift only add annotations and do not change current ones. So, in order to re-annotate a file, you should first remove the old annotations and then re-annotate. 
The reason for this behavior is simply because replacing annotation values is considered a bad practice. Imagine that you have a VCF entry  in your re-annotated file having the value "AA=1": How do you know if this is from the old annotations or from the new ones? This confusion often leads to problems in downstream steps of your pipelines, so it's better to avoid the problem by first removing all the previous annotations and then adding the new ones. 

@EXTERNAL_DOCUMENTATION@
    http://snpeff.sourceforge.net/SnpSift.html#rmInfo

@CITATION_SECTION@

    </help>
</tool>