Mercurial > repos > iuc > ivar_variants
comparison ivar_variants.xml @ 11:38b91a3190cd draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit a14db40361bcb2ee608bccd9222e1654aaea3324
author | iuc |
---|---|
date | Wed, 11 Jan 2023 09:53:09 +0000 |
parents | 252dfb042563 |
children | ed28dd32141c |
comparison
equal
deleted
inserted
replaced
10:584beffa972b | 11:38b91a3190cd |
---|---|
1 <tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy2"> | 1 <tool id="ivar_variants" name="ivar variants" version="@TOOL_VERSION@+galaxy3" profile="@PROFILE@"> |
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> | 7 <expand macro="version_command"/> |
8 </expand> | |
9 <expand macro="version_command" /> | |
10 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
11 ln -s '$ref' ref.fa && | 9 ln -s '$ref' ref.fa && |
12 ln -s '$input_bam' sorted.bam && | 10 ln -s '$input_bam' sorted.bam && |
13 samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants | 11 samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants |
14 -p variants | 12 -p variants |
15 -q $min_qual | 13 -q $min_qual |
16 -t $min_freq | 14 -t $min_freq |
17 #if str($output_format.choice) == "tabular" or str($output_format.choice) == "tabular_and_vcf" | 15 #if str($output_format.choice) == "tabular" or str($output_format.choice) == "tabular_and_vcf" |
18 && cp variants.tsv '$output_variants_tabular' | 16 #if str($gtf) != 'None': |
17 -r ref.fa | |
18 -g '$gtf' | |
19 #end if | |
19 #end if | 20 #end if |
20 #if str($output_format.choice) == 'vcf' or str($output_format.choice) == "tabular_and_vcf" | 21 #if str($output_format.choice) == "vcf" or str($output_format.choice) == "tabular_and_vcf" |
21 && python '${__tool_directory__}/ivar_variants_to_vcf.py' | 22 && python '${__tool_directory__}/ivar_variants_to_vcf.py' |
22 ${output_format.pass_only} | 23 ${output_format.pass_only} |
23 variants.tsv '$output_variants_vcf' | 24 variants.tsv variants.vcf |
24 #end if | 25 #end if |
25 ]]> </command> | 26 ]]></command> |
26 <inputs> | 27 <inputs> |
27 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> | 28 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> |
28 <param name="ref" type="data" format="fasta" label="Reference"/> | 29 <param name="ref" type="data" format="fasta" label="Reference"/> |
29 <param name="min_qual" argument="-q" type="integer" min="1" value="20" label="Minimum quality score threshold to count base"/> | 30 <param name="min_qual" argument="-q" type="integer" min="1" value="20" label="Minimum quality score threshold to count base"/> |
30 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/> | 31 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/> |
33 <option value="tabular">Tabular (native tool output)</option> | 34 <option value="tabular">Tabular (native tool output)</option> |
34 <option value="vcf">VCF</option> | 35 <option value="vcf">VCF</option> |
35 <option value="tabular_and_vcf">Both Tabular and VCF</option> | 36 <option value="tabular_and_vcf">Both Tabular and VCF</option> |
36 </param> | 37 </param> |
37 <when value="vcf"> | 38 <when value="vcf"> |
38 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> | 39 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters"/> |
39 </when> | 40 </when> |
40 <when value="tabular_and_vcf"> | 41 <when value="tabular_and_vcf"> |
41 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> | 42 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters"/> |
43 <param name="gtf" argument="-g" optional="true" type="data" format="gff" label="Coordinates of ORFs for optional variant effect prediction" help="Provide a GFF3 dataset with annotated ORFs to have the rightmost 5 columns of the tabular output populated with mutation information at the residue level. This has no effect on the VCF output."/> | |
42 </when> | 44 </when> |
43 <when value="tabular" /> | 45 <when value="tabular"> |
44 </conditional> | 46 <param name="gtf" argument="-g" optional="true" type="data" format="gff" label="Coordinates of ORFs for optional variant effect prediction" help="Provide a GFF3 dataset with annotated ORFs to have the rightmost 5 columns of the tabular output populated with mutation information at the residue level."/> |
47 </when> | |
48 </conditional> | |
45 </inputs> | 49 </inputs> |
46 <outputs> | 50 <outputs> |
47 <data name="output_variants_tabular" format="tabular" label="${tool.name} tabular output on ${on_string}"> | 51 <data name="output_variants_tabular" from_work_dir="./variants.tsv" format="tabular" label="${tool.name} tabular output on ${on_string}"> |
48 <filter>output_format['choice'] == 'tabular' or output_format['choice'] == 'tabular_and_vcf'</filter> | 52 <filter>output_format['choice'] == 'tabular' or output_format['choice'] == 'tabular_and_vcf'</filter> |
49 <actions> | 53 <actions> |
50 <action name="column_names" type="metadata" default="REGION,POS,REF,ALT,REF_DP,REF_RV,REF_QUAL,ALT_DP,ALT_RV,ALT_QUAL,ALT_FREQ,TOTAL_DP,PVAL,PASS,GFF_FEATURE,REF_CODON,REF_AA,ALT_CODON,ALT_AA" /> | 54 <action name="column_names" type="metadata" default="REGION,POS,REF,ALT,REF_DP,REF_RV,REF_QUAL,ALT_DP,ALT_RV,ALT_QUAL,ALT_FREQ,TOTAL_DP,PVAL,PASS,GFF_FEATURE,REF_CODON,REF_AA,ALT_CODON,ALT_AA"/> |
51 </actions> | 55 </actions> |
52 </data> | 56 </data> |
53 <data name="output_variants_vcf" format="vcf" label="${tool.name} VCF on ${on_string}"> | 57 <data name="output_variants_vcf" from_work_dir="./variants.vcf" format="vcf" label="${tool.name} VCF on ${on_string}"> |
54 <filter>output_format['choice'] == 'vcf' or output_format['choice'] == 'tabular_and_vcf'</filter> | 58 <filter>output_format['choice'] == 'vcf' or output_format['choice'] == 'tabular_and_vcf'</filter> |
55 </data> | 59 </data> |
56 </outputs> | 60 </outputs> |
57 <tests> | 61 <tests> |
58 <test expect_num_outputs="1"> | 62 <test expect_num_outputs="1"> |
59 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | 63 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> |
60 <param name="ref" value="zika/db/PRV.fa" /> | 64 <param name="ref" value="zika/db/PRV.fa"/> |
61 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> | 65 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular"/> |
62 </test> | 66 </test> |
63 <test expect_num_outputs="1"> | 67 <test expect_num_outputs="1"> |
64 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | 68 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> |
65 <param name="ref" value="zika/db/PRV.fa" /> | 69 <param name="ref" value="zika/db/PRV.fa"/> |
66 <conditional name="output_format"> | 70 <conditional name="output_format"> |
67 <param name="choice" value="vcf" /> | 71 <param name="choice" value="vcf"/> |
68 </conditional> | 72 </conditional> |
69 <output name="output_variants_vcf" file="zika/Z52_a.vcf" ftype="vcf"/> | 73 <output name="output_variants_vcf" file="zika/Z52_a.vcf" ftype="vcf"/> |
70 </test> | 74 </test> |
71 <test expect_num_outputs="2"> | 75 <test expect_num_outputs="2"> |
72 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | 76 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> |
73 <param name="ref" value="zika/db/PRV.fa" /> | 77 <param name="ref" value="zika/db/PRV.fa"/> |
74 <conditional name="output_format"> | 78 <conditional name="output_format"> |
75 <param name="choice" value="tabular_and_vcf" /> | 79 <param name="choice" value="tabular_and_vcf"/> |
76 <param name="pass_only" value="true" /> | 80 <param name="pass_only" value="true"/> |
77 </conditional> | 81 </conditional> |
78 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> | 82 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="6"/> |
79 <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> | 83 <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> |
80 </test> | 84 </test> |
81 | 85 <test expect_num_outputs="1"> |
86 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> | |
87 <param name="ref" value="zika/db/PRV.fa"/> | |
88 <param name="gtf" value="zika/db/PRV.gff"/> | |
89 <output name="output_variants_tabular" file="zika/Z52_a_annotated.tsv" ftype="tabular"/> | |
90 </test> | |
91 <test expect_num_outputs="2"> | |
92 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> | |
93 <param name="ref" value="zika/db/PRV.fa"/> | |
94 <param name="gtf" value="zika/db/PRV.gff"/> | |
95 <conditional name="output_format"> | |
96 <param name="choice" value="tabular_and_vcf"/> | |
97 <param name="pass_only" value="true"/> | |
98 </conditional> | |
99 <output name="output_variants_tabular" file="zika/Z52_a_annotated.tsv" ftype="tabular"/> | |
100 <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> | |
101 </test> | |
82 </tests> | 102 </tests> |
83 <help><![CDATA[ | 103 <help><![CDATA[ |
84 iVar uses the output of the samtools mpileup command to call variants - | 104 iVar uses the output of the samtools mpileup command to call variants - |
85 single nucleotide variants(SNVs) and indels. In order to call variants | 105 single nucleotide variants(SNVs) and indels. In order to call variants |
86 correctly, the reference file used for alignment must be passed to iVar | 106 correctly, the reference file used for alignment must be passed to iVar |
87 using the -r flag. The output of samtools pileup is piped into ivar variants | 107 using the -r flag. The output of samtools pileup is piped into ivar variants |
88 to generate a .tsv file with the variants. There are two parameters that can | 108 to generate a .tsv file with the variants. There are two parameters that can |
89 be set for variant calling using iVar - minimum quality(Default: 20) and | 109 be set for variant calling using iVar - minimum quality(Default: 20) and |
90 minimum frequency(Default: 0.03). Minimum quality is the minimum quality for | 110 minimum frequency(Default: 0.03). Minimum quality is the minimum quality for |
91 a base to be counted towards the ungapped depth to canculate iSNV frequency | 111 a base to be counted towards the ungapped depth to canculate iSNV frequency |
92 at a given position. For insertions, the quality metric is discarded and the | 112 at a given position. For insertions, the quality metric is discarded and the |
93 mpileup depth is used directly. Minimum frequency is the minimum frequency | 113 mpileup depth is used directly. Minimum frequency is the minimum frequency |
94 required for a SNV or indel to be reported. | 114 required for a SNV or indel to be reported. |
95 | |
96 Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. | |
97 | 115 |
98 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>`_, | 116 Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. |
99 that has been modified to store attributes in INFO fields. | 117 |
100 ]]> </help> | 118 Optionally output is converted to VCF using a version of the |
119 `ivar_variants_to_vcf.py script <https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py>`_, | |
120 that has been modified to store attributes in INFO fields. | |
121 ]]></help> | |
101 <expand macro="citations"> | 122 <expand macro="citations"> |
102 <citation type="bibtex">@misc{githubivar_variants_to_vcf, | 123 <citation type="bibtex">@misc{githubivar_variants_to_vcf, |
103 author = {Fernandez, Sarai Varona and Patel, Harshil}, | 124 author = {Fernandez, Sarai Varona and Patel, Harshil}, |
104 year = {2021}, | 125 year = {2021}, |
105 title = {ivar_variants_to_vcf}, | 126 title = {ivar_variants_to_vcf}, |
106 url = {https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py} | 127 url = {https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py} |
107 }</citation> </expand> | 128 }</citation> |
129 </expand> | |
108 </tool> | 130 </tool> |