Mercurial > repos > devteam > ncbi_blast_plus
comparison tools/ncbi_blast_plus/ncbi_blastp_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_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.20"> | 1 <tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.22"> |
2 <description>Search protein database with protein query sequence(s)</description> | 2 <description>Search protein database with protein 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" /> |
5 <requirements> | 5 <macros> |
6 <requirement type="binary">blastp</requirement> | 6 <token name="@BINARY@">blastp</token> |
7 <requirement type="package" version="2.2.26+">blast+</requirement> | 7 <import>ncbi_macros.xml</import> |
8 </requirements> | 8 </macros> |
9 <version_command>blastp -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 blastp | 13 blastp |
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 -task $blast_type | 16 -task $blast_type |
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 -matrix $adv_opts.matrix | 21 -matrix $adv_opts.matrix |
35 ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string | 22 @ADVANCED_OPTIONS@ |
36 ## Note -max_target_seqs overrides -num_descriptions and -num_alignments | |
37 #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0): | |
38 -max_target_seqs $adv_opts.max_hits | |
39 #end if | |
40 #if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0): | |
41 -word_size $adv_opts.word_size | |
42 #end if | |
43 ##Ungapped disabled for now - see comments below | 23 ##Ungapped disabled for now - see comments below |
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="Protein query sequence(s)"/> | 32 <param name="query" type="data" format="fasta" label="Protein 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 |
62 <option value="histdb">BLAST database from your history</option> | |
63 <option value="file">FASTA file from your history (see warning note below)</option> | |
64 </param> | |
65 <when value="db"> | |
66 <param name="database" type="select" label="Protein BLAST database"> | |
67 <options from_file="blastdb_p.loc"> | |
68 <column name="value" index="0"/> | |
69 <column name="name" index="1"/> | |
70 <column name="path" index="2"/> | |
71 </options> | |
72 </param> | |
73 <param name="histdb" type="hidden" value="" /> | |
74 <param name="subject" type="hidden" value="" /> | |
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="blast_type" type="select" display="radio" label="Type of BLAST"> | 36 <param name="blast_type" type="select" display="radio" label="Type of BLAST"> |
88 <option value="blastp">blastp</option> | 37 <option value="blastp">blastp</option> |
89 <option value="blastp-short">blastp-short</option> | 38 <option value="blastp-short">blastp-short</option> |
90 </param> | 39 </param> |
91 <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" /> | 40 <expand macro="input_evalue" /> |
92 <param name="out_format" type="select" label="Output format"> | 41 <expand macro="input_out_format" /> |
93 <option value="6">Tabular (standard 12 columns)</option> | 42 <expand macro="advanced_options"> |
94 <option value="ext" selected="True">Tabular (extended 24 columns)</option> | 43 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' --> |
95 <option value="5">BLAST XML</option> | 44 <expand macro="input_filter_query_default_false" /> |
96 <option value="0">Pairwise text</option> | 45 <expand macro="input_scoring_matrix" /> |
97 <option value="0 -html">Pairwise HTML</option> | 46 <expand macro="input_max_hits" /> |
98 <option value="2">Query-anchored text</option> | 47 <expand macro="input_word_size" /> |
99 <option value="2 -html">Query-anchored HTML</option> | |
100 <option value="4">Flat query-anchored text</option> | |
101 <option value="4 -html">Flat query-anchored HTML</option> | |
102 <!-- | 48 <!-- |
103 <option value="-outfmt 11">BLAST archive format (ASN.1)</option> | 49 Can't use '-ungapped' on its own, error back is: |
50 Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search | |
51 Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.' | |
52 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" /> | |
104 --> | 53 --> |
105 </param> | 54 <expand macro="input_parse_deflines" /> |
106 <conditional name="adv_opts"> | 55 </expand> |
107 <param name="adv_opts_selector" type="select" label="Advanced Options"> | |
108 <option value="basic" selected="True">Hide Advanced Options</option> | |
109 <option value="advanced">Show Advanced Options</option> | |
110 </param> | |
111 <when value="basic" /> | |
112 <when value="advanced"> | |
113 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' --> | |
114 <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="false" /> | |
115 <param name="matrix" type="select" label="Scoring matrix"> | |
116 <option value="BLOSUM90">BLOSUM90</option> | |
117 <option value="BLOSUM80">BLOSUM80</option> | |
118 <option value="BLOSUM62" selected="true">BLOSUM62 (default)</option> | |
119 <option value="BLOSUM50">BLOSUM50</option> | |
120 <option value="BLOSUM45">BLOSUM45</option> | |
121 <option value="PAM250">PAM250</option> | |
122 <option value="PAM70">PAM70</option> | |
123 <option value="PAM30">PAM30</option> | |
124 </param> | |
125 <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer --> | |
126 <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits"> | |
127 <validator type="in_range" min="0" /> | |
128 </param> | |
129 <!-- I'd like word_size to be optional, with minimum 2 for blastp --> | |
130 <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2."> | |
131 <validator type="in_range" min="0" /> | |
132 </param> | |
133 <!-- | |
134 Can't use '-ungapped' on its own, error back is: | |
135 Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search | |
136 Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.' | |
137 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" /> | |
138 --> | |
139 <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"/> | |
140 </when> | |
141 </conditional> | |
142 </inputs> | 56 </inputs> |
143 <outputs> | 57 <outputs> |
144 <data name="output1" format="tabular" label="${blast_type.value_label} on ${on_string}"> | 58 <data name="output1" format="tabular" label="${blast_type.value_label} $query.name vs @ON_DB_SUBJECT@"> |
145 <change_format> | 59 <expand macro="output_change_format" /> |
146 <when input="out_format" value="0" format="txt"/> | |
147 <when input="out_format" value="0 -html" format="html"/> | |
148 <when input="out_format" value="2" format="txt"/> | |
149 <when input="out_format" value="2 -html" format="html"/> | |
150 <when input="out_format" value="4" format="txt"/> | |
151 <when input="out_format" value="4 -html" format="html"/> | |
152 <when input="out_format" value="5" format="blastxml"/> | |
153 </change_format> | |
154 </data> | 60 </data> |
155 </outputs> | 61 </outputs> |
156 <tests> | 62 <tests> |
157 <test> | 63 <test> |
158 <param name="query" value="four_human_proteins.fasta" ftype="fasta" /> | 64 <param name="query" value="four_human_proteins.fasta" ftype="fasta" /> |
214 <output name="output1" file="blastp_rhodopsin_vs_four_human.tabular" ftype="tabular" /> | 120 <output name="output1" file="blastp_rhodopsin_vs_four_human.tabular" ftype="tabular" /> |
215 </test> | 121 </test> |
216 </tests> | 122 </tests> |
217 <help> | 123 <help> |
218 | 124 |
219 .. class:: warningmark | 125 @SEARCH_TIME_WARNING@ |
220 | |
221 **Note**. Database searches may take a substantial amount of time. | |
222 For large input datasets it is advisable to allow overnight processing. | |
223 | |
224 ----- | |
225 | 126 |
226 **What it does** | 127 **What it does** |
227 | 128 |
228 Search a *protein database* using a *protein query*, | 129 Search a *protein database* using a *protein query*, |
229 using the NCBI BLAST+ blastp command line tool. | 130 using the NCBI BLAST+ blastp command line tool. |
230 | 131 |
231 .. class:: warningmark | 132 @FASTA_WARNING@ |
232 | |
233 You can also search against a FASTA file of subject protein | |
234 sequences. This is *not* advised because it is slower (only one | |
235 CPU is used), but more importantly gives e-values for pairwise | |
236 searches (very small e-values which will look overly signficiant). | |
237 In most cases you should instead turn the other FASTA file into a | |
238 database first using *makeblastdb* and search against that. | |
239 | 133 |
240 ----- | 134 ----- |
241 | 135 |
242 **Output format** | 136 @OUTPUT_FORMAT@ |
243 | |
244 Because Galaxy focuses on processing tabular data, the default output of this | |
245 tool is tabular. The standard BLAST+ tabular output contains 12 columns: | |
246 | |
247 ====== ========= ============================================ | |
248 Column NCBI name Description | |
249 ------ --------- -------------------------------------------- | |
250 1 qseqid Query Seq-id (ID of your sequence) | |
251 2 sseqid Subject Seq-id (ID of the database hit) | |
252 3 pident Percentage of identical matches | |
253 4 length Alignment length | |
254 5 mismatch Number of mismatches | |
255 6 gapopen Number of gap openings | |
256 7 qstart Start of alignment in query | |
257 8 qend End of alignment in query | |
258 9 sstart Start of alignment in subject (database hit) | |
259 10 send End of alignment in subject (database hit) | |
260 11 evalue Expectation value (E-value) | |
261 12 bitscore Bit score | |
262 ====== ========= ============================================ | |
263 | |
264 The BLAST+ tools can optionally output additional columns of information, | |
265 but this takes longer to calculate. Most (but not all) of these columns are | |
266 included by selecting the extended tabular output. The extra columns are | |
267 included *after* the standard 12 columns. This is so that you can write | |
268 workflow filtering steps that accept either the 12 or 24 column tabular | |
269 BLAST output. Galaxy now uses this extended 24 column output by default. | |
270 | |
271 ====== ============= =========================================== | |
272 Column NCBI name Description | |
273 ------ ------------- ------------------------------------------- | |
274 13 sallseqid All subject Seq-id(s), separated by a ';' | |
275 14 score Raw score | |
276 15 nident Number of identical matches | |
277 16 positive Number of positive-scoring matches | |
278 17 gaps Total number of gaps | |
279 18 ppos Percentage of positive-scoring matches | |
280 19 qframe Query frame | |
281 20 sframe Subject frame | |
282 21 qseq Aligned part of query sequence | |
283 22 sseq Aligned part of subject sequence | |
284 23 qlen Query sequence length | |
285 24 slen Subject sequence length | |
286 ====== ============= =========================================== | |
287 | |
288 The third option is BLAST XML output, which is designed to be parsed by | |
289 another program, and is understood by some Galaxy tools. | |
290 | |
291 You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program). | |
292 The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website. | |
293 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query. | |
294 The two query anchored outputs show a multiple sequence alignment between the query and all the matches, | |
295 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences). | |
296 | 137 |
297 ------- | 138 ------- |
298 | 139 |
299 **References** | 140 **References** |
300 | 141 |
301 If you use this Galaxy tool in work leading to a scientific publication please | 142 If you use this Galaxy tool in work leading to a scientific publication please |
302 cite the following papers: | 143 cite the following papers: |
303 | 144 |
304 Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013). | 145 @REFERENCES@ |
305 Galaxy tools and workflows for sequence analysis with applications | |
306 in molecular plant pathology. PeerJ 1:e167 | |
307 http://dx.doi.org/10.7717/peerj.167 | |
308 | |
309 Christiam Camacho et al. (2009). | |
310 BLAST+: architecture and applications. | |
311 BMC Bioinformatics. 15;10:421. | |
312 http://dx.doi.org/10.1186/1471-2105-10-421 | |
313 | |
314 This wrapper is available to install into other Galaxy Instances via the Galaxy | |
315 Tool Shed at http://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus | |
316 </help> | 146 </help> |
317 </tool> | 147 </tool> |