comparison ivar_variants.xml @ 6:147465efa99c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 847ec10cd36ea4f3cd4c257d5742f0fb401e364e"
author iuc
date Thu, 10 Jun 2021 22:06:04 +0000
parents 12d66d0d05ac
children 252dfb042563
comparison
equal deleted inserted replaced
5:49236b03e4fd 6:147465efa99c
1 <tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy0"> 1 <tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy1">
2 <description>Call variants from aligned BAM file</description> 2 <description>Call variants from aligned BAM file</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements" /> 6 <expand macro="requirements">
7 <requirement type="package" version="3">python</requirement>
8 </expand>
7 <expand macro="version_command" /> 9 <expand macro="version_command" />
8 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
9 ln -s '$ref' ref.fa && 11 ln -s '$ref' ref.fa &&
10 ln -s '$input_bam' sorted.bam && 12 ln -s '$input_bam' sorted.bam &&
11 samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants 13 samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants
12 -p variants 14 -p variants
13 -q $min_qual 15 -q $min_qual
14 -t $min_freq 16 -t $min_freq &&
17 #if str($output_format.choice) == 'vcf'
18 python '${__tool_directory__}/ivar_variants_to_vcf.py'
19 ${output_format.pass_only}
20 variants.tsv '$output_variants'
21 #else
22 cp variants.tsv '$output_variants'
23 #end if
15 ]]> </command> 24 ]]> </command>
16 <inputs> 25 <inputs>
17 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> 26 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/>
18 <param name="ref" type="data" format="fasta" label="Reference"/> 27 <param name="ref" type="data" format="fasta" label="Reference"/>
19 <param name="min_qual" argument="-q" type="integer" min="1" value="20" label="Minimum quality score threshold to count base"/> 28 <param name="min_qual" argument="-q" type="integer" min="1" value="20" label="Minimum quality score threshold to count base"/>
20 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/> 29 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/>
30 <conditional name="output_format">
31 <param name="choice" type="select" label="Output format">
32 <option value="tabular">Tabular (native tool output)</option>
33 <option value="vcf">VCF</option>
34 </param>
35 <when value="vcf">
36 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" />
37 </when>
38 <when value="tabular" />
39 </conditional>
21 </inputs> 40 </inputs>
22 <outputs> 41 <outputs>
23 <data name="output_variants" format="tabular" label="${tool.name} on ${on_string}" from_work_dir="variants.tsv"/> 42 <data name="output_variants" format="tabular" label="${tool.name} on ${on_string}">
43 <change_format>
44 <when input="output_format.choice" value="vcf" format="vcf" />
45 </change_format>
46 </data>
24 </outputs> 47 </outputs>
25 <tests> 48 <tests>
26 <test> 49 <test expect_num_outputs="1">
27 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> 50 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" />
28 <param name="ref" value="zika/db/PRV.fa" /> 51 <param name="ref" value="zika/db/PRV.fa" />
29 <output name="output_variants" file="zika/Z52_a.tsv" lines_diff="10"/> 52 <output name="output_variants" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/>
53 </test>
54 <test expect_num_outputs="1">
55 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" />
56 <param name="ref" value="zika/db/PRV.fa" />
57 <conditional name="output_format">
58 <param name="choice" value="vcf" />
59 </conditional>
60 <output name="output_variants" file="zika/Z52_a.vcf" ftype="vcf"/>
30 </test> 61 </test>
31 </tests> 62 </tests>
32 <help><![CDATA[ 63 <help><![CDATA[
33 iVar uses the output of the samtools mpileup command to call variants - 64 iVar uses the output of the samtools mpileup command to call variants -
34 single nucleotide variants(SNVs) and indels. In order to call variants 65 single nucleotide variants(SNVs) and indels. In order to call variants
41 at a given position. For insertions, the quality metric is discarded and the 72 at a given position. For insertions, the quality metric is discarded and the
42 mpileup depth is used directly. Minimum frequency is the minimum frequency 73 mpileup depth is used directly. Minimum frequency is the minimum frequency
43 required for a SNV or indel to be reported. 74 required for a SNV or indel to be reported.
44 75
45 Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. 76 Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_.
77
78 Optionally output is converted to VCF using a version of the `ivar_variants_to_vcf.py script <https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py>`_,
79 that has been modified to store attributes in INFO fields.
46 ]]> </help> 80 ]]> </help>
47 <expand macro="citations" /> 81 <expand macro="citations">
82 <citation type="bibtex">@misc{githubivar_variants_to_vcf,
83 author = {Fernandez, Sarai Varona and Patel, Harshil},
84 year = {2021},
85 title = {ivar_variants_to_vcf},
86 url = {https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py}
87 }</citation> </expand>
48 </tool> 88 </tool>