Mercurial > repos > bebatut > metaphlan2
comparison metaphlan2.xml @ 29:713a83023626 draft
planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/metaphlan2/ commit 450bf3326f301c344103272b0d761e8625ce0c44-dirty
author | bebatut |
---|---|
date | Wed, 01 Jun 2016 10:43:23 -0400 |
parents | 1d993cca38e3 |
children | 99fe591b59fb |
comparison
equal
deleted
inserted
replaced
28:1d993cca38e3 | 29:713a83023626 |
---|---|
14 metaphlan2.py -v | 14 metaphlan2.py -v |
15 ]]> | 15 ]]> |
16 </version_command> | 16 </version_command> |
17 | 17 |
18 <command> | 18 <command> |
19 <![CDATA[ | 19 <![CDATA[ |
20 (which bowtie2 || exit 200) | 20 (which bowtie2 || exit 200) |
21 | 21 |
22 && | 22 && |
23 | |
24 #if $db.db_selector == "history" | |
25 mkdir ref_db | |
26 && | |
27 bowtie2-build $db.db_sequences ref_db/ref_db | |
28 && | |
29 python $__tool_directory__/transform_json_to_pkl.py | |
30 --json_input $db_metadata | |
31 --pkl_output ref_db/metadata.pkl | |
32 && | |
33 #end if | |
23 | 34 |
24 metaphlan2.py | 35 metaphlan2.py |
25 $input_file | 36 $input_file |
26 -o $output_file | 37 -o $output_file |
27 | |
28 --input_type ${input_file.datatype.file_ext} | 38 --input_type ${input_file.datatype.file_ext} |
29 | 39 |
30 #if $mpa_pkl.mpa_pkl_selector == "cached" | 40 --bowtie2_exe `which bowtie2` |
31 #set $mpa_pkl_table = dict([(_[0], _[2]) for _ in $mpa_pkl.cached_mpa_pkl.input.options.tool_data_table.data]) | 41 |
32 #set $mpa_pkl_db = $mpa_pkl.cached_mpa_pkl.value | 42 #if $db.db_selector == "cached" |
33 --mpa_pkl $mpa_pkl_table[$mpa_pkl_db] | 43 #set $table = dict([(_[0], _[2]) for _ in $db.cached_db.input.options.tool_data_table.data]) |
44 #set $db_choice = $db.cached_db.value | |
45 --bowtie2db $table[$db_choice] | |
46 --mpa_pkl $table[$db_choice]".pkl" | |
34 #else | 47 #else |
35 --mpa_pkl $mpa_pkl.history_mpa_pkl | 48 --bowtie2db ref_db/ref_db |
36 #end if | 49 --mpa_pkl ref_db/metadata.pkl |
37 | |
38 --bowtie2_exe `which bowtie2` | |
39 | |
40 #if $bowtie2db.bowtie2db_selector == "cached" | |
41 #set $bowtie2_table = dict([(_[0], _[2]) for _ in $bowtie2db.cached_bowtie2db.input.options.tool_data_table.data]) | |
42 #set $bowtie2db_choice = $bowtie2db.cached_bowtie2db.value | |
43 --bowtie2db $bowtie2_table[$bowtie2db_choice] | |
44 #else | |
45 --bowtie2db $bowtie2db.history_bowtie2db | |
46 #end if | 50 #end if |
47 | 51 |
48 --no_map | 52 --no_map |
49 | 53 |
50 -t $analysis_type.analysis_type_select | 54 -t $analysis_type.analysis_type_select |
51 #if $analysis_type.analysis_type_select == "rel_ab" | 55 #if $analysis_type.analysis_type_select == "rel_ab" |
52 --tax_lev $analysis_type.taxonomic_level | 56 --tax_lev $analysis_type.taxonomic_level |
53 #else if $analysis_type.analysis_type_select == "marker_ab_table" | 57 #else if $analysis_type.analysis_type_select == "marker_ab_table" |
54 --nreads $analysis_type.nreads | 58 --nreads $analysis_type.nreads |
55 #else if $analysis_type.analysis_type_select == "marker_pres_table" | 59 #else if $analysis_type.analysis_type_select == "marker_pres_table" |
56 --pres_th $analysis_type.pres_th | 60 --pres_th $analysis_type.pres_th |
57 #end if | 61 #end if |
58 | 62 |
59 --min_cu_len $min_cu_len | 63 --min_cu_len $min_cu_len |
60 --min_alignment_len $min_alignment_len | 64 --min_alignment_len $min_alignment_len |
61 | 65 |
63 $ignore_eukaryotes | 67 $ignore_eukaryotes |
64 $ignore_bacteria | 68 $ignore_bacteria |
65 $ignore_archaea | 69 $ignore_archaea |
66 | 70 |
67 --stat_q $stat_q | 71 --stat_q $stat_q |
68 | 72 -s $sam_output_file |
69 #if $sam_output | |
70 -s $sam_output_file | |
71 #end if | |
72 | |
73 #if $biom_output | |
74 --biom $biom_output_file | |
75 #end if | |
76 ]]> | 73 ]]> |
77 </command> | 74 </command> |
78 | 75 |
79 <inputs> | 76 <inputs> |
80 <param name="input_file" type="data" format="fastq,fasta,sam,bowtie2out" label="Input file" help=""/> | 77 <param name="input_file" type="data" format="fastq,fasta,sam" label="Input file" help=""/> |
81 | 78 |
82 <conditional name="mpa_pkl"> | 79 <conditional name="db"> |
83 <param name="mpa_pkl_selector" type="select" label="Metadata" help=""> | 80 <param name="db_selector" type="select" label="Database with clade-specific marker genes" help=""> |
84 <option value="cached" selected="true">Locally cached</option> | 81 <option value="cached" selected="true">Locally cached</option> |
85 <option value="history">From history</option> | 82 <option value="history">From history</option> |
86 </param> | 83 </param> |
87 | 84 |
88 <when value="cached"> | 85 <when value="cached"> |
89 <param name="cached_mpa_pkl" label="Cached metadata" type="select"> | 86 <param name="cached_db" label="Cached database with clade-specific marker genes" type="select" > |
90 <options from_data_table="metaphlan2_metadata" /> | 87 <options from_data_table="metaphlan2_db" /> |
91 </param> | 88 </param> |
92 </when> | 89 </when> |
93 <when value="history"> | 90 <when value="history"> |
94 <param name="history_mpa_pkl" type="data" format="fasta" label="Metadata from history"/> | 91 <param name="db_sequences" type="data" format="fasta" label="Database with clade-specific marker genes from history" help="(--bowtie2db)"/> |
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)"/> | |
95 </when> | 93 </when> |
96 </conditional> | 94 </conditional> |
97 | 95 |
98 <conditional name="bowtie2db"> | |
99 <param name="bowtie2db_selector" type="select" label="BowTie2 database" help=""> | |
100 <option value="cached" selected="true">Locally cached</option> | |
101 <option value="history">From history</option> | |
102 </param> | |
103 | |
104 <when value="cached"> | |
105 <param name="cached_bowtie2db" label="Cached BowTie2 database" type="select" > | |
106 <options from_data_table="metaphlan2_bowtie_db" /> | |
107 </param> | |
108 </when> | |
109 <when value="history"> | |
110 <param name="history_bowtie2db" type="data" format="fasta" label="BowTie2 database from history"/> | |
111 </when> | |
112 </conditional> | |
113 | |
114 <conditional name="analysis_type"> | 96 <conditional name="analysis_type"> |
115 <param name="analysis_type_select" type="select" label="Type of analysis to perform"> | 97 <param name="analysis_type_select" type="select" label="Type of analysis to perform" help="(-t)"> |
116 <option value="rel_ab" selected="true">Profiling a metagenomes in terms of relative abundances</option> | 98 <option value="rel_ab" selected="true">Profiling a metagenomes in terms of relative abundances</option> |
117 <option value="reads_map">Mapping from reads to clades (only reads hitting a marker)</option> | 99 <option value="reads_map">Mapping from reads to clades (only reads hitting a marker)</option> |
118 <option value="clade_profiles">Normalized marker counts for clades with at least a non-null marker</option> | 100 <option value="clade_profiles">Normalized marker counts for clades with at least a non-null marker</option> |
119 <option value="marker_ab_table">Normalized marker counts (only when > 0.0 and normalized by metagenome size if --nreads is specified)</option> | 101 <option value="marker_ab_table">Normalized marker counts (only when > 0.0 and normalized by metagenome size if --nreads is specified)</option> |
120 <option value="marker_counts">Non-normalized marker counts (use with extreme caution)</option> | 102 <option value="marker_counts">Non-normalized marker counts (use with extreme caution)</option> |
121 <option value="marker_pres_table">List of markers present in the sample (threshold at 1.0 if not differently specified with --pres_th</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> |
122 </param> | 104 </param> |
123 | 105 |
124 <when value="rel_ab"> | 106 <when value="rel_ab"> |
125 <param name="taxonomic_level" type="select" label="Taxonomic level for the relative abundance output"> | 107 <param name="taxonomic_level" type="select" label="Taxonomic level for the relative abundance output" help="(--tax_lev)"> |
126 <option value="a" selected="true">All taxonomic levels</option> | 108 <option value="a" selected="true">All taxonomic levels</option> |
127 <option value="k">Kingdoms (Bacteria and Archaea) only</option> | 109 <option value="k">Kingdoms (Bacteria and Archaea) only</option> |
128 <option value="p">Phyla only</option> | 110 <option value="p">Phyla only</option> |
129 <option value="c">Classes only</option> | 111 <option value="c">Classes only</option> |
130 <option value="o">Orders only</option> | 112 <option value="o">Orders only</option> |
158 <param name="ignore_bacteria" type='boolean' checked="true" truevalue='' falsevalue='--ignore_bacteria' label="Profile bacteria organisms?" help="" /> | 140 <param name="ignore_bacteria" type='boolean' checked="true" truevalue='' falsevalue='--ignore_bacteria' label="Profile bacteria organisms?" help="" /> |
159 | 141 |
160 <param name="ignore_archaea" type='boolean' checked="true" truevalue='' falsevalue='--ignore_archaea' label="Profile archea organisms?" help="" /> | 142 <param name="ignore_archaea" type='boolean' checked="true" truevalue='' falsevalue='--ignore_archaea' label="Profile archea organisms?" help="" /> |
161 | 143 |
162 <param name="stat_q" type="float" value="0.1" label="Quantile value for the robust average" help=""/> | 144 <param name="stat_q" type="float" value="0.1" label="Quantile value for the robust average" help=""/> |
163 | |
164 <param name="sam_output" type='boolean' label="Output a sam file?" help="" /> | |
165 | |
166 <param name="biom_output" type='boolean' label="Output a biom file?" help="" /> | |
167 </inputs> | 145 </inputs> |
168 | 146 |
169 <outputs> | 147 <outputs> |
170 <data format="tabular" name="output_file" | 148 <data format="tabular" name="output_file" label="${tool.name} on ${on_string}: Community profile" /> |
171 metadata="input_sequence_file" | 149 <data format="sam" name="sam_output_file" label="${tool.name} on ${on_string}: Sam file" /> |
172 label="${tool.name} on ${on_string}: Community profile" /> | |
173 | |
174 <data format="sam" name="sam_output_file" | |
175 metadata="input_sequence_file" | |
176 label="${tool.name} on ${on_string}: Sam file"> | |
177 <filter>sam_output</filter> | |
178 </data> | |
179 <data format="biom" name="biom_output_file" | |
180 metadata="input_sequence_file" | |
181 label="${tool.name} on ${on_string}: Biom file"> | |
182 <filter>biom_output</filter> | |
183 </data> | |
184 </outputs> | 150 </outputs> |
185 | 151 |
186 <tests> | 152 <tests> |
187 <test> | 153 <test> |
188 <param name="input_file" value="metaphlan2_input_sequences.fastq"/> | 154 <param name="input_file" value="input_sequences.fasta"/> |
189 <param name="mpa_pkl" value="" /> | 155 <param name="db_selector" value="history" /> |
190 <param name="bowtie2db" value="" /> | 156 <param name="db_metadata" value="marker_metadata.json" /> |
157 <param name="db_sequences" value="marker_sequences.fasta" /> | |
191 <param name="analysis_type_select" value="rel_ab" /> | 158 <param name="analysis_type_select" value="rel_ab" /> |
192 <param name="taxonomic_level" value="a" /> | 159 <param name="taxonomic_level" value="a" /> |
193 <param name="min_cu_len" value="2000" /> | 160 <param name="min_cu_len" value="2000" /> |
194 <param name="min_alignment_len" value="0" /> | 161 <param name="min_alignment_len" value="0" /> |
195 <param name="ignore_viruses" value="" /> | 162 <param name="ignore_viruses" value="" /> |
196 <param name="ignore_eukaryotes" value="" /> | 163 <param name="ignore_eukaryotes" value="" /> |
197 <param name="ignore_bacteria" value="" /> | 164 <param name="ignore_bacteria" value="" /> |
198 <param name="ignore_archaea" value="" /> | 165 <param name="ignore_archaea" value="" /> |
199 <param name="stat_q" value="0.1" /> | 166 <param name="stat_q" value="0.1" /> |
200 <param name="sam_output" value='false' /> | 167 <output name="output_file" file="community_profile.tabular"/> |
201 <param name="biom_output" value='false' /> | |
202 <output name="output_file" file="metaphlan2_profiled_metagenome.txt"/> | |
203 </test> | 168 </test> |
204 </tests> | 169 </tests> |
205 | 170 |
206 <help><![CDATA[ | 171 <help><![CDATA[ |
207 | |
208 **What it does** | 172 **What it does** |
209 | 173 |
210 MetaPhlAn is a computational tool for profiling the composition of microbial communities (Bacteria, Archaea, Eukaryotes and Viruses) from metagenomic shotgun sequencing data with species level resolution. For more information, check the `user manual <https://bitbucket.org/biobakery/metaphlan2/>`_. | 174 MetaPhlAn is a computational tool for profiling the composition of microbial communities (Bacteria, Archaea, Eukaryotes and Viruses) from metagenomic shotgun sequencing data with species level resolution. For more information, check the `user manual <https://bitbucket.org/biobakery/metaphlan2/>`_. |
211 | 175 |
212 Metaphlan2 takes as input a sequence file in fasta, fastq, a BowTie2 produced | 176 **Inputs** |
213 SAM file or an intermediary mapping file of the metagenome generated by a | 177 |
214 previous MetaPhlAn | 178 Metaphlan2 takes as input a sequence file in fasta, fastq, a BowTie2 produced SAM file. |
215 | 179 |
216 Several parameters can modulate the MetaPhlAn execution | 180 It is also possible to use a custom database with clade-specific marker genes. In this case, a fasta file with marker gene sequences is required and also a file containing metadata. This file is a json file with: |
217 | 181 |
218 * Mapping arguments | 182 :: |
219 | 183 |
220 * Test to avoid saving the output of BowTie2 | 184 { |
221 | 185 "taxonomy": { |
222 * Post-mapping arguments | 186 "taxonomy of genome1": genome1_length, |
223 | 187 "taxonomy of genome2": genome2_length, |
224 * Taxonomic level for the relative abundance output | 188 ... |
225 * Minimum total nucleotide length for the markers in a clade for estimating the abundance without considering sub-clade abundances | 189 } |
226 * Sam records for aligned reads with the longest subalignment length smaller than this threshold will be discarded | 190 "markers": { |
227 * Tests to avoid profiling of virus, eukaryotes, bacteria and/or archea | 191 "marker1_name": { |
228 * Quantile value | 192 "clade": the clade that the marker belongs to, |
229 | 193 "ext": [list of external genomes where the marker appears], |
230 * Additional analysis types and arguments | 194 "len": length of the marker, |
231 | 195 "score": score of the marker, |
232 * Type of analyse to perform and some parameters for specific analysis type | 196 "taxon": the taxon of the marker |
233 | 197 } |
234 | 198 ... |
235 The main output file is a tab-separated output file of the predicted taxon | 199 } |
236 relative abundances. | 200 } |
201 | |
202 The marker names correspond to sequence name in corresponding fasta file with marker gene sequences. | |
203 | |
204 **Outputs** | |
205 | |
206 The main output file is a tab-separated output file of the predicted taxon relative abundances. | |
237 | 207 |
238 ]]></help> | 208 ]]></help> |
239 | 209 |
240 <citations> | 210 <citations> |
241 <citation type="doi">10.1038/nmeth.3589</citation> | 211 <citation type="doi">10.1038/nmeth.3589</citation> |