Mercurial > repos > iuc > ivar_consensus
annotate ivar_consensus.xml @ 18:3a72fede57ce draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 32fbe8a14173afe0b39f1483afaba958dc6cd027
author | iuc |
---|---|
date | Fri, 21 Jun 2024 15:19:15 +0000 |
parents | e4ee04da1c19 |
children |
rev | line source |
---|---|
13
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
1 <tool id="ivar_consensus" name="ivar consensus" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
2 <description>Call consensus from aligned BAM file</description> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
3 <macros> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
4 <import>macros.xml</import> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
5 </macros> |
11
3e4f434a69c6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit a14db40361bcb2ee608bccd9222e1654aaea3324
iuc
parents:
0
diff
changeset
|
6 <expand macro="requirements"/> |
3e4f434a69c6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit a14db40361bcb2ee608bccd9222e1654aaea3324
iuc
parents:
0
diff
changeset
|
7 <expand macro="version_command"/> |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
8 <command detect_errors="exit_code"><![CDATA[ |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
9 #import re |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
10 #set $clean_name = re.sub('[^\w\-]', '_', str($input_bam.element_identifier)) |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
11 ln -s '$input_bam' sorted.bam && |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
12 samtools mpileup -A -a -d 0 -Q 0 sorted.bam | ivar consensus |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
13 -p consensus |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
14 -q $min_qual |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
15 -t $min_freq |
13
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
16 -c $min_indel_freq |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
17 -m $min_depth |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
18 $depth_action |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
19 && |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
20 sed -i "s|consensus|$clean_name|" consensus.fa |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
21 ]]></command> |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
22 <inputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
23 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
24 <param name="min_qual" argument="-q" type="integer" min="0" max="255" value="20" label="Minimum quality score threshold to count base"/> |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
25 <param name="min_freq" argument="-t" type="float" min="0" max="1" value="0.0" label="Minimum frequency threshold"> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
26 <help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
27 <![CDATA[ |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
28 0 - Majority or most common base <br/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
29 0.2 - Bases that make up atleast 20% of the depth at a position <br/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
30 0.5 - Strict or bases that make up atleast 50% of the depth at a position <br/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
31 0.9 - Strict or bases that make up atleast 90% of the depth at a position <br/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
32 1 - Identical or bases that make up 100% of the depth at a position. Will have highest ambiguities |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
33 ]]> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
34 </help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
35 </param> |
13
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
36 <param name="min_indel_freq" argument="-c" type="float" min="0" max="1" value="0.8" label="Minimum indel frequency threshold" help="Same meaning as the "Minimum frequency threshold" above, but applied to indels."/> |
14
e4ee04da1c19
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 3839802e0a790cb519cffdc2d8a6b92d73e4c9ef
iuc
parents:
13
diff
changeset
|
37 <param name="min_depth" argument="-m" type="integer" min="1" value="10" label="Minimum depth to call consensus"/> |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
38 <param name="depth_action" type="select" label="How to represent positions with coverage less than the minimum depth threshold"> |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
39 <option value="-k">Drop from output (-k)</option> |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
40 <option value="-n N" selected="true">Represent as N (-n N)</option> |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
41 <option value="-n -">Represent as - (-n -)</option> |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
42 </param> |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
43 </inputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
44 <outputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
45 <data name="consensus" format="fasta" label="${tool.name} on ${on_string} Consensus" from_work_dir="consensus.fa"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
46 </outputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
47 <tests> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
48 <test> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
49 <param name="input_bam" value="covid19/PC00101P_sub.trimmed.sorted.bam" /> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
50 <output name="consensus" file="covid19/PC00101P_sub.fa" ftype="fasta" compare="contains" lines_diff="1"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
51 </test> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
52 </tests> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
53 <help><![CDATA[ |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
54 .. class:: infomark |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
55 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
56 To generate a consensus sequence iVar uses the output of samtools mpileup |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
57 command. The mpileup output must be piped into ivar consensus |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
58 |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
59 The command formed by this wrapper is : |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
60 |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
61 samtools mpileup -A -a -d 0 -Q 0 sorted.bam | ivar consensus [options] |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
62 |
13
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
63 There are five parameters that can be set: |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
64 |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
65 - **Minimum quality**: the minimum quality of a base to be considered in calculations of variant frequencies at a given position |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
66 |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
67 - **Minimum frequency threshold**: the minimum frequency that the most likely base must surpass to be called as the consensus base at a position. |
13
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
68 |
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
69 - **Minimum indel frequency threshold**: has the same meaning as the previous threshold, but gets applied to indels specifically. Setting this threshold higher than the threshold applied to SNVs helps reduce indel artefacts in the generated consensus. |
1069f6db0a0e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 02d1d482bda9804c69d2d03c890151bc491e5c73
iuc
parents:
12
diff
changeset
|
70 |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
71 - **Minimum depth to call consensus**: the minimum required depth to call a consensus base |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
72 |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
73 - **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: |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
74 |
12
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
75 - Drop the position from the output entirely (-> the consensus sequence can become shorter than the reference used to produce the input BAM!) |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
76 - Use an ``N``, or |
9c5754002592
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit fc9887dd2a1468b58a5da12a91fe3fbcd226e981
iuc
parents:
11
diff
changeset
|
77 - Use a ``-`` to represent the position |
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
78 ]]> </help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
79 <expand macro="citations" /> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
80 </tool> |