comparison ivar_consensus.xml @ 12:9c5754002592 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
author iuc
date Fri, 10 Feb 2023 17:06:13 +0000
parents 3e4f434a69c6
children 1069f6db0a0e
comparison
equal deleted inserted replaced
11:3e4f434a69c6 12:9c5754002592
1 <tool id="ivar_consensus" name="ivar consensus" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@"> 1 <tool id="ivar_consensus" name="ivar consensus" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@">
2 <description>Call consensus from aligned BAM file</description> 2 <description>Call consensus 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 <expand macro="version_command"/> 7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
9 #import re 9 #import re
10 #set $clean_name = re.sub('[^\w\-]', '_', str($input_bam.element_identifier)) 10 #set $clean_name = re.sub('[^\w\-]', '_', str($input_bam.element_identifier))
11 ln -s '$input_bam' sorted.bam && 11 ln -s '$input_bam' sorted.bam &&
12 samtools mpileup -A -d 0 -Q 0 sorted.bam | ivar consensus 12 samtools mpileup -A -a -d 0 -Q 0 sorted.bam | ivar consensus
13 -p consensus 13 -p consensus
14 -q $min_qual 14 -q $min_qual
15 -t $min_freq 15 -t $min_freq
16 -m $min_depth 16 -m $min_depth
17 $filter_depth 17 $depth_action
18 #if $gap
19 -n N
20 #end if
21 && 18 &&
22 sed -i "s|consensus|$clean_name|" consensus.fa 19 sed -i "s|consensus|$clean_name|" consensus.fa
23 ]]> </command> 20 ]]></command>
24 <inputs> 21 <inputs>
25 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> 22 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/>
26 <param name="min_qual" argument="-q" type="integer" min="0" value="20" label="Minimum quality score threshold to count base"/> 23 <!-- Warning: integer params in the following define a max of 255 intentionally
24 because the underlying C++ code of ivar defines them as uint8 and does not check for overflow! -->
25 <param name="min_qual" argument="-q" type="integer" min="0" max="255" value="20" label="Minimum quality score threshold to count base"/>
27 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.0" label="Minimum frequency threshold"> 26 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.0" label="Minimum frequency threshold">
28 <help> 27 <help>
29 <![CDATA[ 28 <![CDATA[
30 0 - Majority or most common base <br/> 29 0 - Majority or most common base <br/>
31 0.2 - Bases that make up atleast 20% of the depth at a position <br/> 30 0.2 - Bases that make up atleast 20% of the depth at a position <br/>
33 0.9 - Strict or bases that make up atleast 90% of the depth at a position <br/> 32 0.9 - Strict or bases that make up atleast 90% of the depth at a position <br/>
34 1 - Identical or bases that make up 100% of the depth at a position. Will have highest ambiguities 33 1 - Identical or bases that make up 100% of the depth at a position. Will have highest ambiguities
35 ]]> 34 ]]>
36 </help> 35 </help>
37 </param> 36 </param>
38 <param name="min_depth" argument="-m" type="integer" min="1" value="10" label="Minimum depth to call consensus"/> 37 <param name="min_depth" argument="-m" type="integer" min="1" max="255" value="10" label="Minimum depth to call consensus"/>
39 <param name="filter_depth" argument="-k" type="boolean" truevalue="-k" falsevalue="" checked="false" label="Exclude regions with smaller depth than the minimum threshold"/> 38 <param name="depth_action" type="select" label="How to represent positions with coverage less than the minimum depth threshold">
40 <param name="gap" argument="-n" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Use N instead of - for regions with less than minimum coverage"/> 39 <option value="-k">Drop from output (-k)</option>
40 <option value="-n N" selected="true">Represent as N (-n N)</option>
41 <option value="-n -">Represent as - (-n -)</option>
42 </param>
41 </inputs> 43 </inputs>
42 <outputs> 44 <outputs>
43 <data name="consensus" format="fasta" label="${tool.name} on ${on_string} Consensus" from_work_dir="consensus.fa"/> 45 <data name="consensus" format="fasta" label="${tool.name} on ${on_string} Consensus" from_work_dir="consensus.fa"/>
44 </outputs> 46 </outputs>
45 <tests> 47 <tests>
46 <test> 48 <test>
47 <param name="input_bam" value="covid19/PC00101P_sub.trimmed.sorted.bam" /> 49 <param name="input_bam" value="covid19/PC00101P_sub.trimmed.sorted.bam" />
48 <param name="gap" value="true" />
49 <output name="consensus" file="covid19/PC00101P_sub.fa" ftype="fasta" compare="contains" lines_diff="1"/> 50 <output name="consensus" file="covid19/PC00101P_sub.fa" ftype="fasta" compare="contains" lines_diff="1"/>
50 </test> 51 </test>
51 </tests> 52 </tests>
52 <help><![CDATA[ 53 <help><![CDATA[
53 .. class:: infomark 54 .. class:: infomark
54 55
55 To generate a consensus sequence iVar uses the output of samtools mpileup 56 To generate a consensus sequence iVar uses the output of samtools mpileup
56 command. The mpileup output must be piped into ivar consensus 57 command. The mpileup output must be piped into ivar consensus
57 58
58 The command for this wrapper is from https://github.com/andersen-lab/ivar/blob/master/pipeline_consensus/Snakefile : 59 The command formed by this wrapper is :
59 60
60 samtools mpileup -A -d 0 -Q 0 sorted.bam | ivar consensus [options] 61 samtools mpileup -A -a -d 0 -Q 0 sorted.bam | ivar consensus [options]
61 62
62 There are five parameters that can be set: 63 There are four parameters that can be set:
63 64
64 - Minimum quality (Default: 20): the minimum quality of a base to be considered in calculations of variant frequencies at a given position 65 - **Minimum quality**: the minimum quality of a base to be considered in calculations of variant frequencies at a given position
65 66
66 - Minimum frequency threshold (Default: 0): the minimum frequency that a base must match to be called as the consensus base at a position. 67 - **Minimum frequency threshold**: the minimum frequency that the most likely base must surpass to be called as the consensus base at a position.
67 68
68 - Minimum depth to call a consensus (Default: 1): the minimum required depth to call a consensus 69 - **Minimum depth to call consensus**: the minimum required depth to call a consensus base
69 70
70 - Filter depth is a flag to exclude nucleotides from regions with depth less than the minimum depth and a character to call in regions with coverage lower than the speicifed minimum depth(Default: '-'). If this flag is set then these regions are not included in the consensus sequence. If it is not set then by default, a '-' is called in these regions. 71 - **How to represent positions with coverage less than the minimum depth threshold**: for positions for which the above minimum depth to call a consensus base is not reached, you can choose one of three different actions:
71 - You can also specfy which character you want to add to the consensus to cover regions with depth less than the minimum depth. This can be done using gap option. It takes of two values: '-' or 'N'. 72
73 - Drop the position from the output entirely (-> the consensus sequence can become shorter than the reference used to produce the input BAM!)
74 - Use an ``N``, or
75 - Use a ``-`` to represent the position
72 ]]> </help> 76 ]]> </help>
73 <expand macro="citations" /> 77 <expand macro="citations" />
74 </tool> 78 </tool>