Mercurial > repos > iuc > malt_run
comparison malt_run.xml @ 0:d505990b8c89 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/malt commit 04aaa266f5b2e557f42c7feca4e081c7e9c1dae6"
author | iuc |
---|---|
date | Fri, 12 Nov 2021 18:39:23 +0000 |
parents | |
children | 87a1202c03e8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d505990b8c89 |
---|---|
1 <tool id="malt_run" name="MALT analyzer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
2 <description></description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements"/> | |
7 <command detect_errors="exit_code"><![CDATA[ | |
8 #import re | |
9 | |
10 ## This will point to a directory. | |
11 #set ref = str($reference.fields.path) | |
12 | |
13 #set input_identifier = re.sub('[^\s\w\-]', '_', str($input.element_identifier)) | |
14 ## malt-run uses the file extension to determine the input format. | |
15 #if $input.is_of_type('fasta', 'fasta.gz'): | |
16 #set input_identifier = $input_identifier + '.fasta' | |
17 #else: | |
18 #set input_identifier = $input_identifier + '.fastq' | |
19 #end if | |
20 #if $input.ext.endswith('.gz'): | |
21 #set input_identifier = $input_identifier + '.gz' | |
22 #end if | |
23 ln -s '${input}' '${input_identifier}' && | |
24 | |
25 malt-run | |
26 --mode '$mode_cond.mode' | |
27 | |
28 #if str($mode_cond.mode) == 'BlastN': | |
29 --matchScore '$mode_cond.matchScore' | |
30 --mismatchScore '$mode_cond.mismatchScore' | |
31 --setLambda '$mode_cond.setLambda' | |
32 --setK '$mode_cond.setK' | |
33 $mode_cond.forward_only | |
34 $mode_cond.reverse_only | |
35 #else if str($mode_cond.mode) == 'BlastP': | |
36 --subMatrix '$mode_cond.sub_matrix' | |
37 #else if str($mode_cond.mode) == 'BlastX': | |
38 --subMatrix '$mode_cond.sub_matrix' | |
39 $mode_cond.forward_only | |
40 $mode_cond.reverse_only | |
41 #end if | |
42 | |
43 --alignmentType '$alignmentType' | |
44 --inFile '$input_identifier' | |
45 --index '$ref' | |
46 ## malt-run requires correct output file extensions. | |
47 --output './output.rma6' | |
48 --numThreads \${GALAXY_SLOTS:-12} | |
49 | |
50 --memoryMode '$advanced_options_performance.memoryMode' | |
51 --maxTables '$advanced_options_performance.maxTables' | |
52 $advanced_options_performance.replicateQueryCache | |
53 | |
54 --minBitScore '$advanced_options_filter.minBitScore' | |
55 --maxExpected '$advanced_options_filter.maxExpected' | |
56 --minPercentIdentity '$advanced_options_filter.minPercentIdentity' | |
57 --maxAlignmentsPerQuery '$advanced_options_filter.maxAlignmentsPerQuery' | |
58 --maxAlignmentsPerRef '$advanced_options_filter.maxAlignmentsPerRef' | |
59 | |
60 --topPercent '$advanced_options_lca.topPercent' | |
61 --minSupportPercent '$advanced_options_lca.minSupportPercent' | |
62 --minSupport '$advanced_options_lca.minSupport' | |
63 --minPercentIdentityLCA '$advanced_options_lca.minPercentIdentityLCA' | |
64 $advanced_options_lca.useMinPercentIdentityFilterLCA | |
65 $advanced_options_lca.weightedLCA | |
66 $advanced_options_lca.magnitudes | |
67 | |
68 --maxSeedsPerFrame '$advanced_options_heuristics.maxSeedsPerFrame' | |
69 --maxSeedsPerRef '$advanced_options_heuristics.maxSeedsPerRef' | |
70 --seedShift '$advanced_options_heuristics.seedShift' | |
71 | |
72 --gapOpen '$advanced_options_alignment.gapOpen' | |
73 --gapExtend '$advanced_options_alignment.gapExtend' | |
74 --band '$advanced_options_alignment.band' | |
75 | |
76 #if str($additional_outputs_cond.additional_outputs) == 'yes': | |
77 $additional_outputs_cond.includeUnaligned | |
78 #if $additional_outputs_cond.output_alignments_cond.output_alignments: | |
79 ## malt-run requires correct output file extensions. | |
80 #set alignments_ext = $additional_outputs_cond.output_alignments_cond.format + '.gz' | |
81 ## This param value must be a path, not a file name so we'll use the ./ approach. | |
82 --alignments './alignments_output.${alignments_ext}' | |
83 --format '$additional_outputs_cond.output_alignments_cond.format' | |
84 #end if | |
85 #if $additional_outputs_cond.output_aligned: | |
86 ## malt-run requires correct output file extensions. | |
87 #set aligned_ext = 'fna.gz' | |
88 ## This param value must be a path, not a file name so we'll use the ./ approach. | |
89 --outAligned './aligned_output.${aligned_ext}' | |
90 #end if | |
91 #if $additional_outputs_cond.output_unaligned: | |
92 ## malt-run requires correct output file extensions. | |
93 ## This param value must be a path, not a file name so we'll use the ./ approach. | |
94 --outUnaligned './unaligned_output.fna.gz' | |
95 #end if | |
96 #end if | |
97 | |
98 && mv 'output.rma6' '$rma6_output' | |
99 | |
100 #if str($additional_outputs_cond.additional_outputs) == 'yes': | |
101 #if $additional_outputs_cond.output_alignments_cond.output_alignments: | |
102 ## malt-run always compresses these outputs. | |
103 && gunzip -c 'alignments_output.${alignments_ext}' > '$alignments_output' | |
104 #end if | |
105 #if $additional_outputs_cond.output_aligned: | |
106 ## malt-run always compresses these outputs. | |
107 && gunzip -c 'aligned_output.${aligned_ext}' > '$aligned_output' | |
108 #end if | |
109 #if $additional_outputs_cond.output_unaligned: | |
110 ## malt-run always compresses these outputs. | |
111 && gunzip -c 'unaligned_output.fna.gz' > '$unaligned_output' | |
112 #end if | |
113 #end if | |
114 ]]></command> | |
115 <inputs> | |
116 <param name="input" type="data" format="fasta,fasta.gz,fastqsanger.gz,fastqsanger" label="Input file containing DNA or protein sequences"/> | |
117 <param name="reference" type="select" label="Reference genome"> | |
118 <options from_data_table="malt_indices"> | |
119 <filter type="sort_by" column="2"/> | |
120 <validator type="no_options" message="A cached reference genome is not available"/> | |
121 </options> | |
122 </param> | |
123 <conditional name="mode_cond" label="Select alignment mode"> | |
124 <param argument="--mode" type="select" label="Alignment mode"> | |
125 <option value="BlastN" selected="True">BlastN</option> | |
126 <option value="BlastP">BlastP</option> | |
127 <option value="BlastX">Blastx</option> | |
128 </param> | |
129 <when value="BlastN"> | |
130 <param argument="--matchScore" type="integer" value="2" label="Alignment match disjointScore"/> | |
131 <param argument="--mismatchScore" type="integer" value="-3" label="Alignment mis-match disjointScore"/> | |
132 <param argument="--setLambda" type="float" value="0.625" label="Parameter Lambda for BLASTN statistics"/> | |
133 <param argument="--setK" type="float" value="0.41" label="Parameter K for BLASTN statistics"/> | |
134 <expand macro="forward_reverse_only"/> | |
135 </when> | |
136 <when value="BlastP"> | |
137 <expand macro="sub_matrix"/> | |
138 </when> | |
139 <when value="BlastX"> | |
140 <expand macro="sub_matrix"/> | |
141 <expand macro="forward_reverse_only"/> | |
142 </when> | |
143 </conditional> | |
144 <param argument="--alignmentType" type="select" label="Alignment type"> | |
145 <option value="Local" selected="True">Local</option> | |
146 <option value="SemiGlobal">SemiGlobal</option> | |
147 </param> | |
148 <section name="advanced_options_performance" title="Advanced options for performance" expanded="false"> | |
149 <param argument="--memoryMode" type="select" display="radio" label="Memory mode"> | |
150 <option value="load" selected="True">Load all indices into memory</option> | |
151 <option value="page">Load indices page by page when needed</option> | |
152 <option value="map">Use memory mapping</option> | |
153 </param> | |
154 <param argument="--maxTables" type="integer" value="0" min="0" label="Maximum number of seed tables to use" help="Zero value uses all tables"/> | |
155 <param argument="--replicateQueryCache" type="boolean" truevalue="--replicateQueryCache" falsevalue="" checked="false" label="Cache results for replicated queries?"/> | |
156 </section> | |
157 <section name="advanced_options_filter" title="Advanced options for filter" expanded="false"> | |
158 <param argument="--minBitScore" type="float" value="50.0" label="Minimum bit disjointScore"/> | |
159 <param argument="--maxExpected" type="float" value="1.0" label="Maximum expected disjointScore"/> | |
160 <param argument="--minPercentIdentity" type="float" value="0.0" label="Minimum percent identity"/> | |
161 <param argument="--maxAlignmentsPerQuery" type="integer" value="25" label="Maximum number of alignments per query"/> | |
162 <param argument="--maxAlignmentsPerRef" type="integer" value="1" label="Maximum number of (non-overlapping) alignments per reference" help="MALT reports up to this many best scoring matches for each hit reference sequence"/> | |
163 </section> | |
164 <section name="advanced_options_lca" title="Advanced options for LCA" expanded="false"> | |
165 <param argument="--topPercent" type="float" value="10.0" label="Top percent value for LCA algorithm" help="For each read, matches are used for taxonomic placement whose bit disjointScore is within this percentage of the best disjointScore"/> | |
166 <param argument="--minSupportPercent" type="float" value="0.001" min="0" label="Minimum support value for LCA algorithm as a percent of assigned reads" help="Zero value ignores this option"/> | |
167 <param argument="--minSupport" type="integer" value="0" min="0" label="Minimum support value for LCA algorithm" help="Overrides the above parameter"/> | |
168 <param argument="--minPercentIdentityLCA" type="float" value="0.0" min="0" label="Minimum percent identity used by the LCA algorithm"/> | |
169 <param argument="--useMinPercentIdentityFilterLCA" type="boolean" truevalue="--useMinPercentIdentityFilterLCA" falsevalue="" checked="false" label="Use percent identity assignment filter?"/> | |
170 <param argument="--weightedLCA" type="boolean" truevalue="--weightedLCA" falsevalue="" checked="false" label="Use the weighted LCA for taxonomic assignment?"/> | |
171 <param argument="--magnitudes" type="boolean" truevalue="--magnitudes" falsevalue="" checked="false" label="Reads have magnitudes (to be used in taxonomic or functional analysis)?"/> | |
172 </section> | |
173 <section name="advanced_options_heuristics" title="Advanced options for heuristics" expanded="false"> | |
174 <param argument="--maxSeedsPerFrame" type="integer" value="100" label="Maximum number of seed matches per offset per read frame"/> | |
175 <param argument="--maxSeedsPerRef" type="integer" value="20" label="Maximum number of seed matches per read and reference"/> | |
176 <param argument="--seedShift" type="integer" value="1" label="Seed shift"/> | |
177 </section> | |
178 <section name="advanced_options_alignment" title="Advanced options for alignment" expanded="false"> | |
179 <param argument="--gapOpen" type="integer" value="11" label="Gap open penalty"/> | |
180 <param argument="--gapExtend" type="integer" value="1" label="Gap extension penalty"/> | |
181 <param argument="band" type="integer" value="4" label="Band width/2 for banded alignment"/> | |
182 </section> | |
183 <conditional name="additional_outputs_cond"> | |
184 <param name="additional_outputs" type="select" label="Specify additional outputs?"> | |
185 <option value="no" selected="True">No</option> | |
186 <option value="yes">Yes</option> | |
187 </param> | |
188 <when value="no"/> | |
189 <when value="yes"> | |
190 <param argument="--includeUnaligned" type="boolean" truevalue="--includeUnaligned" falsevalue="" checked="false" label="Include unaligned queries in RMA output file?"/> | |
191 <conditional name="output_alignments_cond"> | |
192 <param name="output_alignments" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output alignments?"/> | |
193 <when value="false"/> | |
194 <when value="true"> | |
195 <param argument="format" type="select" label="Alignment format"> | |
196 <option value="SAM" selected="True">SAM</option> | |
197 <option value="Tab">Tab (tabulated BLAST format)</option> | |
198 <option value="Text">Text (full text BLAST matches)</option> | |
199 </param> | |
200 </when> | |
201 </conditional> | |
202 <param name="output_aligned" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output all reads that have at least one significant alignment to the reference?"/> | |
203 <param name="output_unaligned" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output all reads that do not have any significant alignment to the reference?"/> | |
204 </when> | |
205 </conditional> | |
206 </inputs> | |
207 <outputs> | |
208 <data name="rma6_output" format="rma6" label="${tool.name} on ${on_string} (RMA6)"/> | |
209 <data name="alignments_output" format="sam" label="${tool.name} on ${on_string} (alignments)"> | |
210 <filter>additional_outputs_cond['additional_outputs'] == 'yes' and additional_outputs_cond['output_alignments_cond']['output_alignments']</filter> | |
211 <change_format> | |
212 <when input="additional_outputs_cond.output_alignments_cond.format" value="Tab" format="tabular"/> | |
213 <when input="additional_outputs_cond.output_alignments_cond.format" value="Text" format="txt"/> | |
214 </change_format> | |
215 </data> | |
216 <data name="aligned_output" format="fasta" label="${tool.name} on ${on_string} (aligned)"> | |
217 <filter>additional_outputs_cond['additional_outputs'] == 'yes' and additional_outputs_cond['output_aligned']</filter> | |
218 </data> | |
219 <data name="unaligned_output" format="fasta" label="${tool.name} on ${on_string} (unaligned)"> | |
220 <filter>additional_outputs_cond['additional_outputs'] == 'yes' and additional_outputs_cond['output_unaligned']</filter> | |
221 </data> | |
222 </outputs> | |
223 <tests> | |
224 <test expect_num_outputs="2"> | |
225 <param name="input" value="input.fastq.gz" ftype="fastqsanger.gz" dbkey="phiX"/> | |
226 <param name="additional_outputs" value="yes"/> | |
227 <param name="includeUnaligned" value="--includeUnaligned"/> | |
228 <param name="output_alignments" value="true"/> | |
229 <output name="rma6_output" ftype="rma6"> | |
230 <assert_contents> | |
231 <has_size value="76465"/> | |
232 </assert_contents> | |
233 <metadata name="dbkey" value="phiX"/> | |
234 </output> | |
235 <output name="alignments_output" file="alignments_output1.sam" ftype="sam" compare="contains"/> | |
236 </test> | |
237 <test expect_num_outputs="3"> | |
238 <param name="input" value="viral.1.protein.fasta.gz" ftype="fasta.gz" dbkey="phiX"/> | |
239 <param name="alignmentType" value="SemiGlobal"/> | |
240 <param name="additional_outputs" value="yes"/> | |
241 <param name="includeUnaligned" value="--includeUnaligned"/> | |
242 <param name="output_alignments" value="true"/> | |
243 <param name="format" value="Text"/> | |
244 <param name="output_unaligned" value="true"/> | |
245 <output name="rma6_output" ftype="rma6"> | |
246 <assert_contents> | |
247 <has_size value="29338"/> | |
248 </assert_contents> | |
249 <metadata name="dbkey" value="phiX"/> | |
250 </output> | |
251 <output name="alignments_output" file="alignments_output2.txt" ftype="txt" compare="contains"/> | |
252 <output name="unaligned_output" file="unaligned_output2.fasta" ftype="fasta" compare="contains"/> | |
253 </test> | |
254 </tests> | |
255 <help> | |
256 **What it does** | |
257 | |
258 Align one or more files of input sequences (DNA or proteins) against an index representing a collection of reference DNA | |
259 or protein sequences. Depending on the type of input and reference sequences, the program can be be run in BLASTN, BLASTP | |
260 or BLASTX mode. | |
261 | |
262 **Options** | |
263 | |
264 **Input file** - specify all input files which must be in FastA or FastQ format and may be gzipped. | |
265 **Referencegenome ** - select the index built by the **MALT index builder** tool. | |
266 **Alignment mode** - run the program in BlastN mode, BlastP mode or BlastX mode. that is, to align DNA and DNA, protein and protein, or DNA reads against protein references, respectively. BlastN mode can only be used if the employed index contains DNA sequences, whereas the BlastP and BlastX modes are only applicable to an index based on protein reference sequences. | |
267 **Alignmentment type - specify the type of alignments to be performed. By default, this is set to Local and the program performs local alignment just like BLAST programs do. Alternatively, this can be set to SemiGlobal and the program will perform semi global alignment in which reads are aligned end-to-end. | |
268 **Include unaligned queries in RMA output file** - ensure that all unaligned queries are placed into the output RMA file. By default, only queries that have an alignment are included. | |
269 </help> | |
270 <citations> | |
271 <citation type="doi">https://doi.org/10.1101/050559</citation> | |
272 </citations> | |
273 </tool> | |
274 |