Mercurial > repos > iuc > ivar_variants
diff 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 |
line wrap: on
line diff
--- a/ivar_variants.xml Wed Jul 13 15:16:43 2022 +0000 +++ b/ivar_variants.xml Wed Jan 11 09:53:09 2023 +0000 @@ -1,28 +1,29 @@ -<tool id="ivar_variants" name="ivar variants" version="@VERSION@+galaxy2"> +<tool id="ivar_variants" name="ivar variants" version="@TOOL_VERSION@+galaxy3" profile="@PROFILE@"> <description>Call variants from aligned BAM file</description> <macros> <import>macros.xml</import> </macros> - <expand macro="requirements"> - <requirement type="package" version="3">python</requirement> - </expand> - <expand macro="version_command" /> + <expand macro="requirements"/> + <expand macro="version_command"/> <command detect_errors="exit_code"><![CDATA[ ln -s '$ref' ref.fa && ln -s '$input_bam' sorted.bam && - samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants + samtools mpileup -A -d 0 --reference ref.fa -B -Q 0 sorted.bam | ivar variants -p variants -q $min_qual - -t $min_freq + -t $min_freq #if str($output_format.choice) == "tabular" or str($output_format.choice) == "tabular_and_vcf" - && cp variants.tsv '$output_variants_tabular' + #if str($gtf) != 'None': + -r ref.fa + -g '$gtf' + #end if #end if - #if str($output_format.choice) == 'vcf' or str($output_format.choice) == "tabular_and_vcf" - && python '${__tool_directory__}/ivar_variants_to_vcf.py' + #if str($output_format.choice) == "vcf" or str($output_format.choice) == "tabular_and_vcf" + && python '${__tool_directory__}/ivar_variants_to_vcf.py' ${output_format.pass_only} - variants.tsv '$output_variants_vcf' + variants.tsv variants.vcf #end if - ]]> </command> + ]]></command> <inputs> <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> <param name="ref" type="data" format="fasta" label="Reference"/> @@ -35,74 +36,95 @@ <option value="tabular_and_vcf">Both Tabular and VCF</option> </param> <when value="vcf"> - <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> + <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters"/> </when> <when value="tabular_and_vcf"> - <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters" /> + <param argument="--pass_only" type="boolean" truevalue="--pass_only" falsevalue="" label="In VCF only output variants that PASS all filters"/> + <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."/> </when> - <when value="tabular" /> - </conditional> + <when value="tabular"> + <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."/> + </when> + </conditional> </inputs> <outputs> - <data name="output_variants_tabular" format="tabular" label="${tool.name} tabular output on ${on_string}"> + <data name="output_variants_tabular" from_work_dir="./variants.tsv" format="tabular" label="${tool.name} tabular output on ${on_string}"> <filter>output_format['choice'] == 'tabular' or output_format['choice'] == 'tabular_and_vcf'</filter> <actions> - <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" /> + <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"/> </actions> </data> - <data name="output_variants_vcf" format="vcf" label="${tool.name} VCF on ${on_string}"> + <data name="output_variants_vcf" from_work_dir="./variants.vcf" format="vcf" label="${tool.name} VCF on ${on_string}"> <filter>output_format['choice'] == 'vcf' or output_format['choice'] == 'tabular_and_vcf'</filter> </data> </outputs> <tests> <test expect_num_outputs="1"> - <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> - <param name="ref" value="zika/db/PRV.fa" /> - <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> + <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> + <param name="ref" value="zika/db/PRV.fa"/> + <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular"/> </test> <test expect_num_outputs="1"> - <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> - <param name="ref" value="zika/db/PRV.fa" /> + <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> + <param name="ref" value="zika/db/PRV.fa"/> <conditional name="output_format"> - <param name="choice" value="vcf" /> + <param name="choice" value="vcf"/> </conditional> <output name="output_variants_vcf" file="zika/Z52_a.vcf" ftype="vcf"/> </test> <test expect_num_outputs="2"> - <param name="input_bam" value="zika/Z52_a.masked.sorted.bam" /> - <param name="ref" value="zika/db/PRV.fa" /> + <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> + <param name="ref" value="zika/db/PRV.fa"/> <conditional name="output_format"> - <param name="choice" value="tabular_and_vcf" /> - <param name="pass_only" value="true" /> + <param name="choice" value="tabular_and_vcf"/> + <param name="pass_only" value="true"/> </conditional> - <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="10"/> + <output name="output_variants_tabular" file="zika/Z52_a.tsv" ftype="tabular" lines_diff="6"/> <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> </test> - + <test expect_num_outputs="1"> + <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> + <param name="ref" value="zika/db/PRV.fa"/> + <param name="gtf" value="zika/db/PRV.gff"/> + <output name="output_variants_tabular" file="zika/Z52_a_annotated.tsv" ftype="tabular"/> + </test> + <test expect_num_outputs="2"> + <param name="input_bam" value="zika/Z52_a.masked.sorted.bam"/> + <param name="ref" value="zika/db/PRV.fa"/> + <param name="gtf" value="zika/db/PRV.gff"/> + <conditional name="output_format"> + <param name="choice" value="tabular_and_vcf"/> + <param name="pass_only" value="true"/> + </conditional> + <output name="output_variants_tabular" file="zika/Z52_a_annotated.tsv" ftype="tabular"/> + <output name="output_variants_vcf" file="zika/Z52_a_pass.vcf" ftype="vcf"/> + </test> </tests> <help><![CDATA[ - iVar uses the output of the samtools mpileup command to call variants - - single nucleotide variants(SNVs) and indels. In order to call variants - correctly, the reference file used for alignment must be passed to iVar - using the -r flag. The output of samtools pileup is piped into ivar variants - to generate a .tsv file with the variants. There are two parameters that can - be set for variant calling using iVar - minimum quality(Default: 20) and - minimum frequency(Default: 0.03). Minimum quality is the minimum quality for - a base to be counted towards the ungapped depth to canculate iSNV frequency - at a given position. For insertions, the quality metric is discarded and the - mpileup depth is used directly. Minimum frequency is the minimum frequency - required for a SNV or indel to be reported. - - Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. +iVar uses the output of the samtools mpileup command to call variants - +single nucleotide variants(SNVs) and indels. In order to call variants +correctly, the reference file used for alignment must be passed to iVar +using the -r flag. The output of samtools pileup is piped into ivar variants +to generate a .tsv file with the variants. There are two parameters that can +be set for variant calling using iVar - minimum quality(Default: 20) and +minimum frequency(Default: 0.03). Minimum quality is the minimum quality for +a base to be counted towards the ungapped depth to canculate iSNV frequency +at a given position. For insertions, the quality metric is discarded and the +mpileup depth is used directly. Minimum frequency is the minimum frequency +required for a SNV or indel to be reported. - 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>`_, - that has been modified to store attributes in INFO fields. - ]]> </help> +Documentation can be found at `<https://andersen-lab.github.io/ivar/html/manualpage.html>`_. + +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>`_, +that has been modified to store attributes in INFO fields. + ]]></help> <expand macro="citations"> <citation type="bibtex">@misc{githubivar_variants_to_vcf, author = {Fernandez, Sarai Varona and Patel, Harshil}, year = {2021}, title = {ivar_variants_to_vcf}, url = {https://github.com/nf-core/viralrecon/blob/dev/bin/ivar_variants_to_vcf.py} - }</citation> </expand> + }</citation> + </expand> </tool>