view varscan_mpileup.xml @ 2:d062703d6f13 draft

planemo upload for repository https://github.com/galaxyproject/iuc/tree/master/tools/varscan commit 30867f1f022bed18ba1c3b8dc9c54226890b3a9c
author iuc
date Tue, 04 Dec 2018 05:16:18 -0500
parents 1e667badbe87
children
line wrap: on
line source

<tool id="varscan_mpileup" name="VarScan mpileup" version="@VERSION@.1">
    <description>for variant detection</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements">
        <requirement type="package" version="4.2.1">gawk</requirement>
    </expand>
    <expand macro="stdio" />
    <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_reads2} 
            --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
            
            ## Set up outputs.
            --output-vcf 1 > '$output'

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

    ]]></command>
    <inputs>
        <param name="input" format="pileup" type="data" label="Samtools 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="min_coverage" />
        <expand macro="min_reads2" />
        <expand macro="min_avg_qual" />
        <expand macro="min_var_freq" value="0.01" />
        <expand macro="min_freq_for_hom" />
        <expand macro="p_value" value="0.99" label="Default p-value threshold for calling variants"/>
        <expand macro="strand_filter" />
        <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"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="test_in1.pileup" />
            <param name="cmd" value="mpileup2cns" />
            <param name="min_coverage" value="8" />
            <param name="min_reads2" 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="varscan_mpileup_result1.vcf" lines_diff="0" />
        </test>
    </tests>

    <help><![CDATA[
@HELP_HEADER@

**Input**

::

  mpileup file - The SAMtools mpileup file
 

**Output**

VarScan produces a VCF 4.1 dataset as output.

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