view cfsan_snp_pipeline_filter_snp_regions.xml @ 0:be8994ce4fb6 draft

Uploaded
author greg
date Thu, 12 Oct 2023 19:55:24 +0000
parents
children bbf17f071638
line wrap: on
line source

<tool id="cfsan_snp_pipeline_filter_snp_regions" name="CFSAN SNP Pipeline: filter SNP Regions" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>based on location</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
#if str($reference_cond.reference_source) == 'cached'
    #set reference = $reference_cond.reference.fields.path
#else:
    #set reference = $reference_cond.reference
#end if
mkdir -p ./samples/sample/ &&
ln -s '$calls' ./samples/sample/var.flt.vcf &&
echo "\$PWD/samples/sample" > ./alignment.txt &&
cfsan_snp_pipeline filter_regions ./alignment.txt '$reference' &&
cp ./samples/sample/var.flt_preserved.vcf '$filcalls' &&
cp ./samples/sample/var.flt_removed.vcf '$excludes'
    ]]></command>
    <inputs>
        <param name="calls" type="data" format="vcf" label="Unfiltered SNP calls from your history"/>
        <expand macro="reference_cond"/>
    </inputs>
    <outputs>
        <data name="filcalls" format="vcf" label="Filtered SNPs"/>
        <data name="excludes" format="vcf" label="SNPs excluded by filtering"/>
    </outputs>
    <tests>
        <test>
            <param name="calls" value="input.vcf" />
            <param name="reference_source" value="history"/>
            <param name="reference" value="lambda_virus.fasta"/>
            <output name="filcalls" value="output_preserved.vcf" lines_diff="6"/>
            <output name="excludes" value="output_removed.vcf" lines_diff="6"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Remove abnormally dense SNPs from the input VCF file, save the reserved SNPs
into a new VCF file, and save the removed SNPs into another VCF file.

**Optional parameters**

 * **force** - Force processing even when result files already exist and are newer than inputs (default: False)
 * **vcfname** - File name of the input VCF files which must exist in each of the sample directories (default: var.flt.vcf)
 * **edge_length** - The length of the edge regions in a contig, in which all SNPs will be removed. (default: 500)
 * **window_size** - The length of the window in which the number of SNPs should be no more than max_num_snp. (default: [1000])
 * **max_snp** - The maximum number of SNPs allowed in a window.  (default: [3])
 * **out_group** - Relative or absolute path to the file indicating outgroup samples, one sample ID per line. (default: None)

**More information**

[CFSAN SNP Pipeline documentation](http://snp-pipeline.readthedocs.io/en/latest/index.html">http://snp-pipeline.readthedocs.io/en/latest/index.html)
    ]]></help>
    <expand macro="citations"/>
</tool>