view cfsan_snp_pipeline_call_sites.xml @ 3:5bfc9e1ce9e9 draft default tip

Uploaded
author greg
date Thu, 23 Nov 2023 19:33:24 +0000
parents 991fbae39ee6
children
line wrap: on
line source

<tool id="call_sites" name="CFSAN SNP pipeline: call sites" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>of high-confidence SNPs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
    cp '$reference' 'reference.fasta' &&
    samtools faidx 'reference.fasta' &&  
    samtools view -b -F 4 '$input' -o ./unsorted.bam &&
    samtools sort -o ./sorted.bam -O BAM ./unsorted.bam &&
    picard MarkDuplicates INPUT=./sorted.bam OUTPUT=/dev/stdout METRICS_FILE='$metrics' | samtools mpileup -f ./reference.fasta - -o '$pileup' &&
    varscan mpileup2snp '$pileup' --min_var-freq 0.90 --output-vcf 1 > '$calls' 
    ]]></command>
    <inputs>
        <param name="input" label="Read alignment to reference" type="data" format="sam"/>
        <param name="reference" label="FASTA Reference from your history" type="data" format="fasta"/>
    </inputs>
    <outputs>
        <data name="calls" label="Call Sites (unfiltered SNPs)" format="vcf"/>
        <data name="pileup" label="Call Sites (pileup)" format="pileup"/>
        <data name="metrics" label="Call sites (Picard metrics)" format="txt"/>
    </outputs>
    <tests>
        <test>
            <param name="reference" value="lambda_virus.fasta"/>
            <param name="input" value="reads.sam"/>
            <output name="calls" ftype="vcf">
                <assert_contents>
                    <has_size value="9976" delta="100"/>
                </assert_contents>
            </output>
            <output name="pileup" ftype="pileup">
                <assert_contents>
                    <has_size value="4259620" delta="100"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Finds the sites with high-confidence SNPs in a sample.

**More information**

CFSAN SNP Pipeline `call consensus documentation <https://snp-pipeline.readthedocs.io/en/latest/cmd_ref.html#call-consensus>`_
    ]]></help>
    <expand macro="citations"/>
</tool>