Mercurial > repos > devteam > ncbi_blast_plus
comparison tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml @ 11:4c4a0da938ff draft
Uploaded v0.0.22, now wraps BLAST+ 2.2.28 allowing extended tabular output to include the hit descriptions as column 25.
Supports $GALAXY_SLOTS.
Includes more tests and heavy use of macros.
author | peterjc |
---|---|
date | Thu, 05 Dec 2013 06:55:59 -0500 |
parents | 70e7dcbf6573 |
children | 623f727cdff1 |
comparison
equal
deleted
inserted
replaced
10:70e7dcbf6573 | 11:4c4a0da938ff |
---|---|
1 <tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.19"> | 1 <tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.22"> |
2 <description>Search protein database with translated nucleotide query sequence(s)</description> | 2 <description>Search protein database with translated nucleotide query sequence(s)</description> |
3 <!-- If job splitting is enabled, break up the query file into parts --> | 3 <!-- If job splitting is enabled, break up the query file into parts --> |
4 <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" shared_inputs="subject,histdb" merge_outputs="output1"></parallelism> | 4 <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1"></parallelism> |
5 <requirements> | 5 <macros> |
6 <requirement type="binary">blastx</requirement> | 6 <token name="@BINARY@">blastx</token> |
7 <requirement type="package" version="2.2.26+">blast+</requirement> | 7 <import>ncbi_macros.xml</import> |
8 </requirements> | 8 </macros> |
9 <version_command>blastx -version</version_command> | 9 <expand macro="requirements" /> |
10 <command> | 10 <command> |
11 ## The command is a Cheetah template which allows some Python based syntax. | 11 ## The command is a Cheetah template which allows some Python based syntax. |
12 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces | 12 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces |
13 blastx | 13 blastx |
14 -query "$query" | 14 -query "$query" |
15 #if $db_opts.db_opts_selector == "db": | 15 @BLAST_DB_SUBJECT@ |
16 -db "${db_opts.database.fields.path}" | |
17 #elif $db_opts.db_opts_selector == "histdb": | |
18 -db "${os.path.join($db_opts.histdb.extra_files_path,'blastdb')}" | |
19 #else: | |
20 -subject "$db_opts.subject" | |
21 #end if | |
22 -query_gencode $query_gencode | 16 -query_gencode $query_gencode |
23 -evalue $evalue_cutoff | 17 -evalue $evalue_cutoff |
24 -out "$output1" | 18 @BLAST_OUTPUT@ |
25 ##Set the extended list here so if/when we add things, saved workflows are not affected | 19 @THREADS@ |
26 #if str($out_format)=="ext": | |
27 -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen" | |
28 #else: | |
29 -outfmt $out_format | |
30 #end if | |
31 -num_threads 8 | |
32 #if $adv_opts.adv_opts_selector=="advanced": | 20 #if $adv_opts.adv_opts_selector=="advanced": |
33 $adv_opts.filter_query | |
34 $adv_opts.strand | 21 $adv_opts.strand |
35 -matrix $adv_opts.matrix | 22 -matrix $adv_opts.matrix |
36 ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string | 23 @ADVANCED_OPTIONS@ |
37 ## Note -max_target_seqs overrides -num_descriptions and -num_alignments | |
38 #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0): | |
39 -max_target_seqs $adv_opts.max_hits | |
40 #end if | |
41 #if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0): | |
42 -word_size $adv_opts.word_size | |
43 #end if | |
44 $adv_opts.ungapped | 24 $adv_opts.ungapped |
45 $adv_opts.parse_deflines | |
46 ## End of advanced options: | 25 ## End of advanced options: |
47 #end if | 26 #end if |
48 </command> | 27 </command> |
49 <stdio> | 28 |
50 <!-- Anything other than zero is an error --> | 29 <expand macro="stdio" /> |
51 <exit_code range="1:" /> | 30 |
52 <exit_code range=":-1" /> | |
53 <!-- In case the return code has not been set propery check stderr too --> | |
54 <regex match="Error:" /> | |
55 <regex match="Exception:" /> | |
56 </stdio> | |
57 <inputs> | 31 <inputs> |
58 <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> | 32 <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> |
59 <conditional name="db_opts"> | 33 |
60 <param name="db_opts_selector" type="select" label="Subject database/sequences"> | 34 <expand macro="input_conditional_protein_db" /> |
61 <option value="db" selected="True">Locally installed BLAST database</option> | 35 <expand macro="input_query_gencode" /> |
62 <option value="histdb">BLAST database from your history</option> | 36 <expand macro="input_evalue" /> |
63 <option value="file">FASTA file from your history (see warning note below)</option> | 37 |
64 </param> | 38 <expand macro="input_out_format" /> |
65 <when value="db"> | 39 <expand macro="advanced_options"> |
66 <param name="database" type="select" label="Protein BLAST database"> | 40 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' --> |
67 <options from_file="blastdb_p.loc"> | 41 <expand macro="input_filter_query_default_true" /> |
68 <column name="value" index="0"/> | 42 <expand macro="input_strand" /> |
69 <column name="name" index="1"/> | 43 <expand macro="input_scoring_matrix" /> |
70 <column name="path" index="2"/> | 44 <expand macro="input_max_hits" /> |
71 </options> | 45 <expand macro="input_word_size" /> |
72 </param> | 46 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" /> |
73 <param name="histdb" type="hidden" value="" /> | 47 <expand macro="input_parse_deflines" /> |
74 <param name="subject" type="hidden" value="" /> | 48 </expand> |
75 </when> | |
76 <when value="histdb"> | |
77 <param name="database" type="hidden" value="" /> | |
78 <param name="histdb" type="data" format="blastdbp" label="Protein BLAST database" /> | |
79 <param name="subject" type="hidden" value="" /> | |
80 </when> | |
81 <when value="file"> | |
82 <param name="database" type="hidden" value="" /> | |
83 <param name="histdb" type="hidden" value="" /> | |
84 <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/> | |
85 </when> | |
86 </conditional> | |
87 <param name="query_gencode" type="select" label="Query genetic code"> | |
88 <!-- See http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details --> | |
89 <option value="1" select="True">1. Standard</option> | |
90 <option value="2">2. Vertebrate Mitochondrial</option> | |
91 <option value="3">3. Yeast Mitochondrial</option> | |
92 <option value="4">4. Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code</option> | |
93 <option value="5">5. Invertebrate Mitochondrial</option> | |
94 <option value="6">6. Ciliate, Dasycladacean and Hexamita Nuclear Code</option> | |
95 <option value="9">9. Echinoderm Mitochondrial</option> | |
96 <option value="10">10. Euplotid Nuclear</option> | |
97 <option value="11">11. Bacteria and Archaea</option> | |
98 <option value="12">12. Alternative Yeast Nuclear</option> | |
99 <option value="13">13. Ascidian Mitochondrial</option> | |
100 <option value="14">14. Flatworm Mitochondrial</option> | |
101 <option value="15">15. Blepharisma Macronuclear</option> | |
102 <option value="16">16. Chlorophycean Mitochondrial Code</option> | |
103 <option value="21">21. Trematode Mitochondrial Code</option> | |
104 <option value="22">22. Scenedesmus obliquus mitochondrial Code</option> | |
105 <option value="23">23. Thraustochytrium Mitochondrial Code</option> | |
106 <option value="24">24. Pterobranchia mitochondrial code</option> | |
107 </param> | |
108 <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" /> | |
109 <param name="out_format" type="select" label="Output format"> | |
110 <option value="6">Tabular (standard 12 columns)</option> | |
111 <option value="ext" selected="True">Tabular (extended 24 columns)</option> | |
112 <option value="5">BLAST XML</option> | |
113 <option value="0">Pairwise text</option> | |
114 <option value="0 -html">Pairwise HTML</option> | |
115 <option value="2">Query-anchored text</option> | |
116 <option value="2 -html">Query-anchored HTML</option> | |
117 <option value="4">Flat query-anchored text</option> | |
118 <option value="4 -html">Flat query-anchored HTML</option> | |
119 <!-- | |
120 <option value="-outfmt 11">BLAST archive format (ASN.1)</option> | |
121 --> | |
122 </param> | |
123 <conditional name="adv_opts"> | |
124 <param name="adv_opts_selector" type="select" label="Advanced Options"> | |
125 <option value="basic" selected="True">Hide Advanced Options</option> | |
126 <option value="advanced">Show Advanced Options</option> | |
127 </param> | |
128 <when value="basic" /> | |
129 <when value="advanced"> | |
130 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' --> | |
131 <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="true" /> | |
132 <param name="strand" type="select" label="Query strand(s) to search against database/subject"> | |
133 <option value="-strand both">Both</option> | |
134 <option value="-strand plus">Plus (forward)</option> | |
135 <option value="-strand minus">Minus (reverse complement)</option> | |
136 </param> | |
137 <param name="matrix" type="select" label="Scoring matrix"> | |
138 <option value="BLOSUM90">BLOSUM90</option> | |
139 <option value="BLOSUM80">BLOSUM80</option> | |
140 <option value="BLOSUM62" selected="true">BLOSUM62 (default)</option> | |
141 <option value="BLOSUM50">BLOSUM50</option> | |
142 <option value="BLOSUM45">BLOSUM45</option> | |
143 <option value="PAM250">PAM250</option> | |
144 <option value="PAM70">PAM70</option> | |
145 <option value="PAM30">PAM30</option> | |
146 </param> | |
147 <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer --> | |
148 <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits"> | |
149 <validator type="in_range" min="0" /> | |
150 </param> | |
151 <!-- I'd like word_size to be optional, with minimum 2 for blastx --> | |
152 <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2."> | |
153 <validator type="in_range" min="0" /> | |
154 </param> | |
155 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" /> | |
156 <param name="parse_deflines" type="boolean" label="Should the query and subject defline(s) be parsed?" truevalue="-parse_deflines" falsevalue="" checked="false" help="This affects the formatting of the query/subject ID strings"/> | |
157 </when> | |
158 </conditional> | |
159 </inputs> | 49 </inputs> |
160 <outputs> | 50 <outputs> |
161 <data name="output1" format="tabular" label="blastx on ${on_string}"> | 51 <data name="output1" format="tabular" label="blastx $query.name vs @ON_DB_SUBJECT@"> |
162 <change_format> | 52 <expand macro="output_change_format" /> |
163 <when input="out_format" value="0" format="txt"/> | |
164 <when input="out_format" value="0 -html" format="html"/> | |
165 <when input="out_format" value="2" format="txt"/> | |
166 <when input="out_format" value="2 -html" format="html"/> | |
167 <when input="out_format" value="4" format="txt"/> | |
168 <when input="out_format" value="4 -html" format="html"/> | |
169 <when input="out_format" value="5" format="blastxml"/> | |
170 </change_format> | |
171 </data> | 53 </data> |
172 </outputs> | 54 </outputs> |
173 <tests> | 55 <tests> |
174 <test> | 56 <test> |
175 <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" /> | 57 <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" /> |
202 <output name="output1" file="blastx_rhodopsin_vs_four_human_ext.tabular" ftype="tabular" /> | 84 <output name="output1" file="blastx_rhodopsin_vs_four_human_ext.tabular" ftype="tabular" /> |
203 </test> | 85 </test> |
204 </tests> | 86 </tests> |
205 <help> | 87 <help> |
206 | 88 |
207 .. class:: warningmark | 89 @SEARCH_TIME_WARNING@ |
208 | |
209 **Note**. Database searches may take a substantial amount of time. | |
210 For large input datasets it is advisable to allow overnight processing. | |
211 | |
212 ----- | |
213 | 90 |
214 **What it does** | 91 **What it does** |
215 | 92 |
216 Search a *protein database* using a *translated nucleotide query*, | 93 Search a *protein database* using a *translated nucleotide query*, |
217 using the NCBI BLAST+ blastx command line tool. | 94 using the NCBI BLAST+ blastx command line tool. |
218 | 95 |
219 .. class:: warningmark | 96 @FASTA_WARNING@ |
220 | |
221 You can also search against a FASTA file of subject protein | |
222 sequences. This is *not* advised because it is slower (only one | |
223 CPU is used), but more importantly gives e-values for pairwise | |
224 searches (very small e-values which will look overly signficiant). | |
225 In most cases you should instead turn the other FASTA file into a | |
226 database first using *makeblastdb* and search against that. | |
227 | 97 |
228 ----- | 98 ----- |
229 | 99 |
230 **Output format** | 100 @OUTPUT_FORMAT@ |
231 | |
232 Because Galaxy focuses on processing tabular data, the default output of this | |
233 tool is tabular. The standard BLAST+ tabular output contains 12 columns: | |
234 | |
235 ====== ========= ============================================ | |
236 Column NCBI name Description | |
237 ------ --------- -------------------------------------------- | |
238 1 qseqid Query Seq-id (ID of your sequence) | |
239 2 sseqid Subject Seq-id (ID of the database hit) | |
240 3 pident Percentage of identical matches | |
241 4 length Alignment length | |
242 5 mismatch Number of mismatches | |
243 6 gapopen Number of gap openings | |
244 7 qstart Start of alignment in query | |
245 8 qend End of alignment in query | |
246 9 sstart Start of alignment in subject (database hit) | |
247 10 send End of alignment in subject (database hit) | |
248 11 evalue Expectation value (E-value) | |
249 12 bitscore Bit score | |
250 ====== ========= ============================================ | |
251 | |
252 The BLAST+ tools can optionally output additional columns of information, | |
253 but this takes longer to calculate. Most (but not all) of these columns are | |
254 included by selecting the extended tabular output. The extra columns are | |
255 included *after* the standard 12 columns. This is so that you can write | |
256 workflow filtering steps that accept either the 12 or 24 column tabular | |
257 BLAST output. Galaxy now uses this extended 24 column output by default. | |
258 | |
259 ====== ============= =========================================== | |
260 Column NCBI name Description | |
261 ------ ------------- ------------------------------------------- | |
262 13 sallseqid All subject Seq-id(s), separated by a ';' | |
263 14 score Raw score | |
264 15 nident Number of identical matches | |
265 16 positive Number of positive-scoring matches | |
266 17 gaps Total number of gaps | |
267 18 ppos Percentage of positive-scoring matches | |
268 19 qframe Query frame | |
269 20 sframe Subject frame | |
270 21 qseq Aligned part of query sequence | |
271 22 sseq Aligned part of subject sequence | |
272 23 qlen Query sequence length | |
273 24 slen Subject sequence length | |
274 ====== ============= =========================================== | |
275 | |
276 The third option is BLAST XML output, which is designed to be parsed by | |
277 another program, and is understood by some Galaxy tools. | |
278 | |
279 You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program). | |
280 The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website. | |
281 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query. | |
282 The two query anchored outputs show a multiple sequence alignment between the query and all the matches, | |
283 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences). | |
284 | 101 |
285 ------- | 102 ------- |
286 | 103 |
287 **References** | 104 **References** |
288 | 105 |
289 If you use this Galaxy tool in work leading to a scientific publication please | 106 If you use this Galaxy tool in work leading to a scientific publication please |
290 cite the following papers: | 107 cite the following papers: |
291 | 108 |
292 Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013). | 109 @REFERENCES@ |
293 Galaxy tools and workflows for sequence analysis with applications | |
294 in molecular plant pathology. PeerJ 1:e167 | |
295 http://dx.doi.org/10.7717/peerj.167 | |
296 | |
297 Christiam Camacho et al. (2009). | |
298 BLAST+: architecture and applications. | |
299 BMC Bioinformatics. 15;10:421. | |
300 http://dx.doi.org/10.1186/1471-2105-10-421 | |
301 | |
302 This wrapper is available to install into other Galaxy Instances via the Galaxy | |
303 Tool Shed at http://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus | |
304 </help> | 110 </help> |
305 </tool> | 111 </tool> |