Mercurial > repos > iuc > ivar_variants
comparison ivar_variants.xml @ 7:252dfb042563 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 80ad6146e8852fb04fbdbe7b14ab120eee605e3a"
author | iuc |
---|---|
date | Fri, 11 Jun 2021 15:42:14 +0000 |
parents | 147465efa99c |
children | 38b91a3190cd |
comparison
equal
deleted
inserted
replaced
6:147465efa99c | 7:252dfb042563 |
---|---|
1 <tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy1"> | 1 <tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy2"> |
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"> |
11 ln -s '$ref' ref.fa && | 11 ln -s '$ref' ref.fa && |
12 ln -s '$input_bam' sorted.bam && | 12 ln -s '$input_bam' sorted.bam && |
13 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 |
14 -p variants | 14 -p variants |
15 -q $min_qual | 15 -q $min_qual |
16 -t $min_freq && | 16 -t $min_freq |
17 #if str($output_format.choice) == 'vcf' | 17 #if str($output_format.choice) == "tabular" or str($output_format.choice) == "tabular_and_vcf" |
18 python '${__tool_directory__}/ivar_variants_to_vcf.py' | 18 && cp variants.tsv '$output_variants_tabular' |
19 #end if | |
20 #if str($output_format.choice) == 'vcf' or str($output_format.choice) == "tabular_and_vcf" | |
21 && python '${__tool_directory__}/ivar_variants_to_vcf.py' | |
19 ${output_format.pass_only} | 22 ${output_format.pass_only} |
20 variants.tsv '$output_variants' | 23 variants.tsv '$output_variants_vcf' |
21 #else | |
22 cp variants.tsv '$output_variants' | |
23 #end if | 24 #end if |
24 ]]> </command> | 25 ]]> </command> |
25 <inputs> | 26 <inputs> |
26 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> | 27 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> |
27 <param name="ref" type="data" format="fasta" label="Reference"/> | 28 <param name="ref" type="data" format="fasta" label="Reference"/> |
29 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.03" label="Minimum frequency threshold"/> | 30 <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 <conditional name="output_format"> |
31 <param name="choice" type="select" label="Output format"> | 32 <param name="choice" type="select" label="Output format"> |
32 <option value="tabular">Tabular (native tool output)</option> | 33 <option value="tabular">Tabular (native tool output)</option> |
33 <option value="vcf">VCF</option> | 34 <option value="vcf">VCF</option> |
35 <option value="tabular_and_vcf">Both Tabular and VCF</option> | |
34 </param> | 36 </param> |
35 <when value="vcf"> | 37 <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 </when> | |
40 <when value="tabular_and_vcf"> | |
36 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> | 41 <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> |
37 </when> | 42 </when> |
38 <when value="tabular" /> | 43 <when value="tabular" /> |
39 </conditional> | 44 </conditional> |
40 </inputs> | 45 </inputs> |
41 <outputs> | 46 <outputs> |
42 <data name="output_variants" format="tabular" label="${tool.name} on ${on_string}"> | 47 <data name="output_variants_tabular" format="tabular" label="${tool.name} tabular output on ${on_string}"> |
43 <change_format> | 48 <filter>output_format['choice'] == 'tabular' or output_format['choice'] == 'tabular_and_vcf'</filter> |
44 <when input="output_format.choice" value="vcf" format="vcf" /> | 49 <actions> |
45 </change_format> | 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" /> |
51 </actions> | |
52 </data> | |
53 <data name="output_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> | |
46 </data> | 55 </data> |
47 </outputs> | 56 </outputs> |
48 <tests> | 57 <tests> |
49 <test expect_num_outputs="1"> | 58 <test expect_num_outputs="1"> |
50 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | 59 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> |
51 <param name="ref" value="zika/db/PRV.fa" /> | 60 <param name="ref" value="zika/db/PRV.fa" /> |
52 <output name="output_variants" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> | 61 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> |
53 </test> | 62 </test> |
54 <test expect_num_outputs="1"> | 63 <test expect_num_outputs="1"> |
55 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | 64 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> |
56 <param name="ref" value="zika/db/PRV.fa" /> | 65 <param name="ref" value="zika/db/PRV.fa" /> |
57 <conditional name="output_format"> | 66 <conditional name="output_format"> |
58 <param name="choice" value="vcf" /> | 67 <param name="choice" value="vcf" /> |
59 </conditional> | 68 </conditional> |
60 <output name="output_variants" file="zika/Z52_a.vcf" ftype="vcf"/> | 69 <output name="output_variants_vcf" file="zika/Z52_a.vcf" ftype="vcf"/> |
61 </test> | 70 </test> |
71 <test expect_num_outputs="2"> | |
72 <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> | |
73 <param name="ref" value="zika/db/PRV.fa" /> | |
74 <conditional name="output_format"> | |
75 <param name="choice" value="tabular_and_vcf" /> | |
76 <param name="pass_only" value="true" /> | |
77 </conditional> | |
78 <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> | |
79 <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> | |
80 </test> | |
81 | |
62 </tests> | 82 </tests> |
63 <help><![CDATA[ | 83 <help><![CDATA[ |
64 iVar uses the output of the samtools mpileup command to call variants - | 84 iVar uses the output of the samtools mpileup command to call variants - |
65 single nucleotide variants(SNVs) and indels. In order to call variants | 85 single nucleotide variants(SNVs) and indels. In order to call variants |
66 correctly, the reference file used for alignment must be passed to iVar | 86 correctly, the reference file used for alignment must be passed to iVar |