Mercurial > repos > iuc > ivar_consensus
annotate ivar_consensus.xml @ 0:f362150bef41 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
author | iuc |
---|---|
date | Mon, 30 Mar 2020 06:37:01 -0400 |
parents | |
children | 3e4f434a69c6 |
rev | line source |
---|---|
0
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
1 <tool id="ivar_consensus" name="ivar consensus" version="@VERSION@+galaxy0"> |
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> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
6 <expand macro="requirements" /> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
7 <expand macro="version_command" /> |
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 && |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
12 samtools mpileup -A -d 0 -Q 0 sorted.bam | ivar consensus |
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 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
16 -m $min_depth |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
17 $filter_depth |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
18 #if $gap |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
19 -n N |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
20 #end if |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
21 && |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
22 sed -i "s|consensus|$clean_name|" consensus.fa |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
23 ]]> </command> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
24 <inputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
25 <param name="input_bam" type="data" format="bam" label="Bam file" help="Aligned reads, to trim primers and quality"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
26 <param name="min_qual" argument="-q" type="integer" min="0" value="20" label="Minimum quality score threshold to count base"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
27 <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
|
28 <help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
29 <![CDATA[ |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
30 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
|
31 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
|
32 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
|
33 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
|
34 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
|
35 ]]> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
36 </help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
37 </param> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
38 <param name="min_depth" argument="-m" type="integer" min="1" value="10" label="Minimum depth to call consensus"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
39 <param name="filter_depth" argument="-k" type="boolean" truevalue="-k" falsevalue="" checked="false" label="Exclude regions with smaller depth than the minimum threshold"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
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"/> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
41 </inputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
42 <outputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
43 <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
|
44 </outputs> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
45 <tests> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
46 <test> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
47 <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
|
48 <param name="gap" value="true" /> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
49 <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
|
50 </test> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
51 </tests> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
52 <help><![CDATA[ |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
53 .. class:: infomark |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
54 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
55 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
|
56 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
|
57 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
58 The command for this wrapper is from https://github.com/andersen-lab/ivar/blob/master/pipeline_consensus/Snakefile : |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
59 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
60 samtools mpileup -A -d 0 -Q 0 sorted.bam | ivar consensus [options] |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
61 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
62 There are five parameters that can be set: |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
63 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
64 - Minimum quality (Default: 20): the minimum quality of a base to be considered in calculations of variant frequencies at a given position |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
65 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
66 - Minimum frequency threshold (Default: 0): the minimum frequency that a base must match to be called as the consensus base at a position. |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
67 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
68 - Minimum depth to call a consensus (Default: 1): the minimum required depth to call a consensus |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
69 |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
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. |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
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'. |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
72 ]]> </help> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
73 <expand macro="citations" /> |
f362150bef41
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 4b0b7fb6c79dcd437392a496a99301d124c9f1dd"
iuc
parents:
diff
changeset
|
74 </tool> |