Mercurial > repos > bebatut > metaphlan2
comparison metaphlan2.xml @ 31:83f06bee818c draft
planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/metaphlan2/ commit a6bf1721b4efa39b8cbcd059288c68e4abf8f9bd-dirty
author | bebatut |
---|---|
date | Tue, 21 Feb 2017 12:29:37 -0500 |
parents | 99fe591b59fb |
children | c941148c75c7 |
comparison
equal
deleted
inserted
replaced
30:99fe591b59fb | 31:83f06bee818c |
---|---|
1 <tool id="metaphlan2" name="MetaPhlAn2" version="2.5.0"> | 1 <tool id="metaphlan2" name="MetaPhlAn2" version="@WRAPPER_VERSION@.0"> |
2 | 2 |
3 <description>to profile the composition of microbial communities</description> | 3 <description>to profile the composition of microbial communities</description> |
4 | 4 |
5 <macros> | 5 <macros> |
6 <import>metaphlan2_macros.xml</import> | 6 <import>metaphlan2_macros.xml</import> |
7 </macros> | 7 </macros> |
8 | 8 |
9 <expand macro="requirements"/> | 9 <expand macro="requirements"> |
10 <requirement type="package" version="2.2.5">bowtie2</requirement> | |
11 </expand> | |
12 | |
10 <expand macro="stdio"/> | 13 <expand macro="stdio"/> |
11 | 14 |
12 <version_command> | 15 <version_command> |
13 <![CDATA[ | 16 <![CDATA[ |
14 metaphlan2.py -v | 17 metaphlan2.py -v |
22 && | 25 && |
23 | 26 |
24 #if $db.db_selector == "history" | 27 #if $db.db_selector == "history" |
25 mkdir ref_db | 28 mkdir ref_db |
26 && | 29 && |
27 bowtie2-build $db.db_sequences ref_db/ref_db | 30 bowtie2-build '$db.bowtie2db' 'ref_db/ref_db' |
28 && | 31 && |
29 python $__tool_directory__/transform_json_to_pkl.py | 32 python '$__tool_directory__/transform_json_to_pkl.py' |
30 --json_input $db_metadata | 33 --json_input '$db.mpa_pkl' |
31 --pkl_output ref_db/metadata.pkl | 34 --pkl_output 'ref_db/metadata.pkl' |
32 && | 35 && |
33 #end if | 36 #end if |
34 | 37 |
35 metaphlan2.py | 38 metaphlan2.py |
36 $input_file | 39 '$input_file' |
37 -o $output_file | 40 -o '$output_file' |
38 --input_type ${input_file.datatype.file_ext} | 41 --input_type '${input_file.datatype.file_ext}' |
39 | 42 |
40 --bowtie2_exe `which bowtie2` | 43 --bowtie2_exe `which bowtie2` |
41 | 44 |
42 #if $db.db_selector == "cached" | 45 #if $db.db_selector == "cached" |
43 #set $table = dict([(_[0], _[2]) for _ in $db.cached_db.input.options.tool_data_table.data]) | 46 #set $table = dict([(_[0], _[2]) for _ in $db.cached_db.input.options.tool_data_table.data]) |
44 #set $db_choice = $db.cached_db.value | 47 #set $db_choice = $db.cached_db.value |
45 --bowtie2db $table[$db_choice] | 48 --bowtie2db '$table[$db_choice]' |
46 --mpa_pkl $table[$db_choice]".pkl" | 49 --mpa_pkl $table[$db_choice]".pkl" |
47 #else | 50 #else |
48 --bowtie2db ref_db/ref_db | 51 --bowtie2db 'ref_db/ref_db' |
49 --mpa_pkl ref_db/metadata.pkl | 52 --mpa_pkl 'ref_db/metadata.pkl' |
50 #end if | 53 #end if |
51 | 54 |
52 --no_map | 55 --no_map |
53 | 56 |
54 -t $analysis_type.analysis_type_select | 57 -t '$analysis_type.analysis_type_select' |
55 #if $analysis_type.analysis_type_select == "rel_ab" | 58 #if $analysis_type.analysis_type_select == "rel_ab" or $analysis_type.analysis_type_select == "rel_ab_w_read_stats" |
56 --tax_lev $analysis_type.taxonomic_level | 59 --tax_lev '$analysis_type.taxonomic_level' |
57 #else if $analysis_type.analysis_type_select == "marker_ab_table" | 60 #else if $analysis_type.analysis_type_select == "marker_ab_table" |
58 --nreads $analysis_type.nreads | 61 --nreads '$analysis_type.nreads' |
59 #else if $analysis_type.analysis_type_select == "marker_pres_table" | 62 #else if $analysis_type.analysis_type_select == "marker_pres_table" |
60 --pres_th $analysis_type.pres_th | 63 --pres_th '$analysis_type.pres_th' |
61 #end if | 64 #end if |
62 | 65 |
63 --min_cu_len $min_cu_len | 66 --min_cu_len '$min_cu_len' |
64 --min_alignment_len $min_alignment_len | 67 --min_alignment_len '$min_alignment_len' |
65 | 68 |
66 $ignore_viruses | 69 $ignore_viruses |
67 $ignore_eukaryotes | 70 $ignore_eukaryotes |
68 $ignore_bacteria | 71 $ignore_bacteria |
69 $ignore_archaea | 72 $ignore_archaea |
70 | 73 |
71 --stat_q $stat_q | 74 --stat_q '$stat_q' |
72 -s $sam_output_file | 75 -s '$sam_output_file' |
76 --biom '$biom_output_file' | |
73 ]]> | 77 ]]> |
74 </command> | 78 </command> |
75 | 79 |
76 <inputs> | 80 <inputs> |
77 <param name="input_file" type="data" format="fastq,fasta,sam" label="Input file" help=""/> | 81 <param name="input_file" type="data" format="fastq,fasta,sam" label="Input file" help=""/> |
78 | |
79 <conditional name="db"> | 82 <conditional name="db"> |
80 <param name="db_selector" type="select" label="Database with clade-specific marker genes" help=""> | 83 <param name="db_selector" type="select" label="Database with clade-specific marker genes" help=""> |
81 <option value="cached" selected="true">Locally cached</option> | 84 <option value="cached" selected="true">Locally cached</option> |
82 <option value="history">From history</option> | 85 <option value="history">From history</option> |
83 </param> | 86 </param> |
84 | |
85 <when value="cached"> | 87 <when value="cached"> |
86 <param name="cached_db" label="Cached database with clade-specific marker genes" type="select" > | 88 <param name="cached_db" label="Cached database with clade-specific marker genes" type="select" > |
87 <options from_data_table="metaphlan2_db" /> | 89 <options from_data_table="metaphlan2_database" /> |
88 </param> | 90 </param> |
89 </when> | 91 </when> |
90 <when value="history"> | 92 <when value="history"> |
91 <param name="db_sequences" type="data" format="fasta" label="Database with clade-specific marker genes from history" help="(--bowtie2db)"/> | 93 <param argument="--bowtie2db" type="data" format="fasta" label="Database with clade-specific marker genes from history"/> |
92 <param name="db_metadata" type="data" format="json" label="Metadata associate to the database with clade-specific marker genes from history" help="(--mpa_pkl)"/> | 94 <param argument="--mpa_pkl" type="data" format="json" label="Metadata associate to the database with clade-specific marker genes from history"/> |
93 </when> | 95 </when> |
94 </conditional> | 96 </conditional> |
95 | |
96 <conditional name="analysis_type"> | 97 <conditional name="analysis_type"> |
97 <param name="analysis_type_select" type="select" label="Type of analysis to perform" help="(-t)"> | 98 <param name="analysis_type_select" type="select" label="Type of analysis to perform" argument="-t"> |
98 <option value="rel_ab" selected="true">Profiling a metagenomes in terms of relative abundances</option> | 99 <option value="rel_ab" selected="true">Profiling a metagenomes in terms of relative abundances</option> |
100 <option value="rel_ab_w_read_stats">Profiling a metagenomes in terms of relative abundances and estimate the number of reads comming from each clade</option> | |
99 <option value="reads_map">Mapping from reads to clades (only reads hitting a marker)</option> | 101 <option value="reads_map">Mapping from reads to clades (only reads hitting a marker)</option> |
100 <option value="clade_profiles">Normalized marker counts for clades with at least a non-null marker</option> | 102 <option value="clade_profiles">Normalized marker counts for clades with at least a non-null marker</option> |
101 <option value="marker_ab_table">Normalized marker counts (only when > 0.0 and normalized by metagenome size if --nreads is specified)</option> | 103 <option value="marker_ab_table">Normalized marker counts (only when > 0.0 and normalized by metagenome size if --nreads is specified)</option> |
102 <option value="marker_counts">Non-normalized marker counts (use with extreme caution)</option> | 104 <option value="marker_counts">Non-normalized marker counts (use with extreme caution)</option> |
103 <option value="marker_pres_table">List of markers present in the sample (threshold at 1.0 if not differently specified with --pres_th</option> | 105 <option value="marker_pres_table">List of markers present in the sample (threshold at 1.0 if not differently specified with --pres_th</option> |
104 </param> | 106 </param> |
105 | |
106 <when value="rel_ab"> | 107 <when value="rel_ab"> |
107 <param name="taxonomic_level" type="select" label="Taxonomic level for the relative abundance output" help="(--tax_lev)"> | 108 <param argument="--taxonomic_level" type="select" label="Taxonomic level for the relative abundance output"> |
108 <option value="a" selected="true">All taxonomic levels</option> | 109 <option value="a" selected="true">All taxonomic levels</option> |
109 <option value="k">Kingdoms (Bacteria and Archaea) only</option> | 110 <option value="k">Kingdoms (Bacteria and Archaea) only</option> |
110 <option value="p">Phyla only</option> | 111 <option value="p">Phyla only</option> |
111 <option value="c">Classes only</option> | 112 <option value="c">Classes only</option> |
112 <option value="o">Orders only</option> | 113 <option value="o">Orders only</option> |
113 <option value="f">Families only</option> | 114 <option value="f">Families only</option> |
114 <option value="g">Genera only</option> | 115 <option value="g">Genera only</option> |
115 <option value="s">Species only</option> | 116 <option value="s">Species only</option> |
116 </param> | 117 </param> |
117 </when> | 118 </when> |
118 | 119 <when value="rel_ab_w_read_stats"> |
120 <param argument="--taxonomic_level" type="select" label="Taxonomic level for the relative abundance output"> | |
121 <option value="a" selected="true">All taxonomic levels</option> | |
122 <option value="k">Kingdoms (Bacteria and Archaea) only</option> | |
123 <option value="p">Phyla only</option> | |
124 <option value="c">Classes only</option> | |
125 <option value="o">Orders only</option> | |
126 <option value="f">Families only</option> | |
127 <option value="g">Genera only</option> | |
128 <option value="s">Species only</option> | |
129 </param> | |
130 </when> | |
119 <when value="reads_map"/> | 131 <when value="reads_map"/> |
120 <when value="clade_profiles"/> | 132 <when value="clade_profiles"/> |
121 | |
122 <when value="marker_ab_table"> | 133 <when value="marker_ab_table"> |
123 <param name="nreads" type="integer" value="0" label="Total number of reads in the original metagenome" help="It is used for normalizing the length-normalized counts with the metagenome size as well. No normalization applied if the value is not specified"/> | 134 <param argument="--nreads" type="integer" value="0" label="Total number of reads in the original metagenome" help="It is used for normalizing the length-normalized counts with the metagenome size as well. No normalization applied if the value is not specified"/> |
124 </when> | 135 </when> |
125 | |
126 <when value="marker_counts"/> | 136 <when value="marker_counts"/> |
127 | |
128 <when value="marker_pres_table"> | 137 <when value="marker_pres_table"> |
129 <param name="pres_th" type="integer" value="0" label=" Threshold for calling a marker present" help=""/> | 138 <param argument="--pres_th" type="integer" value="0" label=" Threshold for calling a marker present"/> |
130 </when> | 139 </when> |
131 </conditional> | 140 </conditional> |
132 | 141 <param argument="--min_cu_len" type="integer" value="2000" label="Minimum total nucleotide length for the markers in a clade for estimating the abundance without considering sub-clade abundances"/> |
133 <param name="min_cu_len" type="integer" value="2000" label="Minimum total nucleotide length for the markers in a clade for estimating the abundance without considering sub-clade abundances" help=""/> | 142 <param argument="--min_alignment_len" type="integer" value="0" label="Sam records for aligned reads with the longest subalignment length smaller than this threshold will be discarded."/> |
134 | 143 <param argument="--ignore_viruses" type='boolean' checked="true" truevalue='' falsevalue='--ignore_viruses' label="Profile viral organisms?"/> |
135 <param name="min_alignment_len" type="integer" value="0" label="Sam records for aligned reads with the longest subalignment length smaller than this threshold will be discarded." help=""/> | 144 <param argument="--ignore_eukaryotes" type='boolean' checked="true" truevalue='' falsevalue='--ignore_eukaryotes' label="Profile eukaryotic organisms?"/> |
136 | 145 <param argument="--ignore_bacteria" type='boolean' checked="true" truevalue='' falsevalue='--ignore_bacteria' label="Profile bacteria organisms?"/> |
137 <param name="ignore_viruses" type='boolean' checked="true" truevalue='' falsevalue='--ignore_viruses' label="Profile viral organisms?" help="" /> | 146 <param argument="--ignore_archaea" type='boolean' checked="true" truevalue='' falsevalue='--ignore_archaea' label="Profile archea organisms?"/> |
138 <param name="ignore_eukaryotes" type='boolean' checked="true" truevalue='' falsevalue='--ignore_eukaryotes' label="Profile eukaryotic organisms?" help="" /> | 147 <param argument="--stat_q" type="float" value="0.1" label="Quantile value for the robust average"/> |
139 | 148 <param argument="--sample_id_key" type="text" value="#SampleID" label="Sample ID key"/> |
140 <param name="ignore_bacteria" type='boolean' checked="true" truevalue='' falsevalue='--ignore_bacteria' label="Profile bacteria organisms?" help="" /> | 149 <param argument="--sample_id" type="text" value="Metaphlan2_Analysis" label="Sample ID"/> |
141 | |
142 <param name="ignore_archaea" type='boolean' checked="true" truevalue='' falsevalue='--ignore_archaea' label="Profile archea organisms?" help="" /> | |
143 | |
144 <param name="stat_q" type="float" value="0.1" label="Quantile value for the robust average" help=""/> | |
145 </inputs> | 150 </inputs> |
146 | 151 |
147 <outputs> | 152 <outputs> |
148 <data format="tabular" name="output_file" label="${tool.name} on ${on_string}: Community profile" /> | 153 <data format="tabular" name="output_file" label="${tool.name} on ${on_string}: Community profile" /> |
149 <data format="sam" name="sam_output_file" label="${tool.name} on ${on_string}: SAM file" /> | 154 <data format="sam" name="sam_output_file" label="${tool.name} on ${on_string}: SAM file" /> |
155 <data format="biom" name="biom_output_file" label="${tool.name} on ${on_string}: BIOM file" /> | |
150 </outputs> | 156 </outputs> |
151 | 157 |
152 <tests> | 158 <tests> |
153 <test> | 159 <test> |
154 <param name="input_file" value="input_sequences.fasta"/> | 160 <param name="input_file" value="input_sequences.fasta"/> |
155 <param name="db_selector" value="history" /> | 161 <param name="db_selector" value="history" /> |
156 <param name="db_metadata" value="marker_metadata.json" /> | 162 <param name="mpa_pkl" value="marker_metadata.json" /> |
157 <param name="db_sequences" value="marker_sequences.fasta" /> | 163 <param name="bowtie2db" value="marker_sequences.fasta" /> |
158 <param name="analysis_type_select" value="rel_ab" /> | 164 <param name="analysis_type_select" value="rel_ab" /> |
159 <param name="taxonomic_level" value="a" /> | 165 <param name="taxonomic_level" value="a" /> |
160 <param name="min_cu_len" value="2000" /> | 166 <param name="min_cu_len" value="2000" /> |
161 <param name="min_alignment_len" value="0" /> | 167 <param name="min_alignment_len" value="0" /> |
162 <param name="ignore_viruses" value="" /> | 168 <param name="ignore_viruses" value="" /> |
163 <param name="ignore_eukaryotes" value="" /> | 169 <param name="ignore_eukaryotes" value="" /> |
164 <param name="ignore_bacteria" value="" /> | 170 <param name="ignore_bacteria" value="" /> |
165 <param name="ignore_archaea" value="" /> | 171 <param name="ignore_archaea" value="" /> |
166 <param name="stat_q" value="0.1" /> | 172 <param name="stat_q" value="0.1" /> |
173 <param name="sample_id_key" value="#SampleID"/> | |
174 <param name="sample_id" value="Metaphlan2_Analysis"/> | |
167 <output name="output_file" file="community_profile.tabular"/> | 175 <output name="output_file" file="community_profile.tabular"/> |
168 </test> | 176 </test> |
169 </tests> | 177 </tests> |
170 | 178 |
171 <help><![CDATA[ | 179 <help><![CDATA[ |
205 | 213 |
206 The main output file is a tab-separated file with the predicted taxon relative abundances. | 214 The main output file is a tab-separated file with the predicted taxon relative abundances. |
207 | 215 |
208 ]]></help> | 216 ]]></help> |
209 | 217 |
210 <citations> | 218 <expand macro="citations"/> |
211 <citation type="doi">10.1038/nmeth.3589</citation> | |
212 </citations> | |
213 </tool> | 219 </tool> |