view covacs_varscan2.xml @ 1:44e9fd8fd25a draft default tip

Uploaded
author elixir-it
date Thu, 15 Nov 2018 15:58:21 -0500
parents eaac11a49bd2
children
line wrap: on
line source

<tool id="covacs_varsca2" name="covacs_varscan2" version="2.4.2">
    <description>varscan2 wrapper for covacs</description>
    <requirements>
        <requirement type="package" version="2.4.2">varscan</requirement>
    </requirements>
    <macros>
        <import>bed_macros.xml</import>
    </macros>
    <stdio>
        <regex match="Exception" source="both" level="fatal" description="Tool exception"/>
        <regex match=".*" source="both" level="log" description="tool progress"/>
    </stdio>

    <version_command><![CDATA[
varscan 2>&1 | head -n 1
    ]]></version_command>

    <command><![CDATA[
        ## Set up samples list file.
        #if $sample_names.strip() != '':
           echo $sample_names | awk -F ',' '{ for (i = 1; i <= NF; i++) { print \$i; } }' > samples_list.txt &&
        #end if

        ## Set up command + input.
        varscan ${cmd} ${input}
        --min-coverage ${min_coverage}
        --min-reads2 ${min_supporting_reads}
        --min-avg-qual ${min_avg_qual}
        --min-var-freq ${min_var_freq}
        --min-freq-for-hom ${min_freq_for_hom}
        --p-value ${p_value}
        #if str($strand_filter) == 'yes':
          --strand-filter 1
        #end if

        ## Report only variants in consensus.
        #if str($cmd) == 'mpileup2cns':
          --variants
        #end if
        
	## varscan bed limit added

 	#if $bed_source.bed_source_selector == "history" and $bed_source.bed_history
      	limit $bed_source.bed_history
      	#end if
        #if $bed_source.bed_source_selector == "cached"
      	limit $bed_source.bed_cached.fields.path
      	#end if

        ## Set up outputs.
        --output-vcf 1 > $output 

        #if $sample_names.strip() != '':
            --vcf-sample-list samples_list.txt
        #end if

	&& perl  $__tool_directory__/filter.varscan.pl $output $output_filtered
    ]]></command>

    <inputs>
        <param format="pileup" name="input" type="data" label="Pileup dataset" help=""/>
        <param name="cmd" type="select" label="Analysis type">
          <option value="mpileup2snp" selected="True">single nucleotide variation</option>
          <option value="mpileup2indel">insertions and deletions</option>
          <option value="mpileup2cns">consensus genotype</option>
        </param>
	<expand macro="bed_loc"/>
        <param name="min_coverage" type="integer" value="8" min="1" max="200" label="Minimum read depth" help="Minimum depth at a position to make a call"/>
        <param name="min_supporting_reads" type="integer" value="2" min="1" max="200" label="Minimum supporting reads" help="Minimum supporting reads at a position to make a call"/>
        <param name="min_avg_qual" type="integer" value="15" min="1" max="50" label="Minimum base quality at a position to count a read"/>
        <param name="min_var_freq" type="float" value="0.01" min="0" max="1" label="Minimum variant allele frequency threshold"/>
        <param name="min_freq_for_hom" type="float" value="0.75" min="0" max="1" label="Minimum frequency to call homozygote"/>
        <param name="p_value" type="float" value="0.99" min="0" max="1" label="p-value threshold for calling variants"/>
        <param name="strand_filter" type="select" label="Ignore variants with >90% support on one strand">
            <option value="no" selected="True">no</option>
            <option value="yes">yes</option>
        </param>
        <param name="sample_names" type="text" value="" help="Separate sample names by comma; leave blank to use default sample names."/>
    </inputs>

    <outputs>
        <data name="output" format="vcf"/>
	<data format="vcf" name="output_filtered" label="varscan2 filtered on ${on_string}" />
    </outputs>
    <tests>
        <test>
            <param name="input" value="test_in1.pileup" />
            <param name="cmd" value="mpileup2cns" />
            <param name="min_coverage" value="8" />
            <param name="min_supporting_reads" value="2" />
            <param name="min_avg_qual" value="15" />
            <param name="min_var_freq" value="0.01" />
            <param name="min_freq_for_hom" value="0.75" />
            <param name="p_value" value="0.99" />
            <param name="strand_filter" value="no" />
            <param name="sample_names" value="" />
            <output name="output" file="test_out1.vcf" lines_diff="0" />
        </test>
    </tests>

    <help>
**VarScan Overview**

VarScan_ performs variant detection for massively parallel sequencing data, such as exome, WGS, and transcriptome data. It calls variants from a mpileup dataset and produces a VCF 4.1 Full documentation is available online_.

.. _VarScan: http://dkoboldt.github.io/varscan/
.. _online: http://dkoboldt.github.io/varscan/using-varscan.html

**Input**

::

  mpileup file - The SAMtools mpileup file

**the wrapper gives 2 output**

-the normal output of varscan2

-the output filtered by the filter.varscan.pl script implemented in the covacs pipeline



**Parameters**

::

  analysis type
    single nucleotide detection     Identify SNPs from an mpileup file
    insertions and deletion       Identify indels an mpileup file
    consensus genotype     Call consensus and variants from an mpileup file

  min-coverage
    Minimum read depth at a position to make a call [8]

  min-reads2
    Minimum supporting reads at a position to call variants [2]

  min-avg-qual
    Minimum base quality at a position to count a read [15]

  min-var-freq
        Minimum variant allele frequency threshold [0.01]

  min-freq-for-hom
    Minimum frequency to call homozygote [0.75]

  p-value
    Default p-value threshold for calling variants [99e-02]

  strand-filter
    Ignore variants with >90% support on one strand [1]

  output-vcf
    If set to 1, outputs in VCF format

  vcf-sample-list
    For VCF output, a list of sample names in order, one per line

  variants
    Report only variant (SNP/indel) positions [0]
    </help>

    <citations>
        <citation type="doi">10.1101/gr.129684.111</citation>
        <citation type="doi">10.1186/s12864-018-4508-1</citation>
    </citations>
</tool>