2
|
1 <tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.12">
|
|
2 <description>Search protein database with protein query sequence(s)</description>
|
|
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" merge_outputs="output1"></parallelism>
|
|
5 <version_command>blastp -version</version_command>
|
|
6 <command interpreter="python">hide_stderr.py
|
|
7 ## The command is a Cheetah template which allows some Python based syntax.
|
|
8 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
|
|
9 blastp
|
|
10 -query "$query"
|
|
11 #if $db_opts.db_opts_selector == "db":
|
|
12 -db "${db_opts.database.fields.path}"
|
|
13 #else:
|
|
14 -subject "$db_opts.subject"
|
|
15 #end if
|
|
16 -task $blast_type
|
|
17 -evalue $evalue_cutoff
|
|
18 -out $output1
|
|
19 ##Set the extended list here so if/when we add things, saved workflows are not affected
|
|
20 #if str($out_format)=="ext":
|
|
21 -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen"
|
|
22 #else:
|
|
23 -outfmt $out_format
|
|
24 #end if
|
|
25 -num_threads 8
|
|
26 #if $adv_opts.adv_opts_selector=="advanced":
|
|
27 $adv_opts.filter_query
|
|
28 -matrix $adv_opts.matrix
|
|
29 ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string
|
|
30 ## Note -max_target_seqs overrides -num_descriptions and -num_alignments
|
|
31 #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):
|
|
32 -max_target_seqs $adv_opts.max_hits
|
|
33 #end if
|
|
34 #if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0):
|
|
35 -word_size $adv_opts.word_size
|
|
36 #end if
|
|
37 ##Ungapped disabled for now - see comments below
|
|
38 ##$adv_opts.ungapped
|
|
39 $adv_opts.parse_deflines
|
|
40 ## End of advanced options:
|
|
41 #end if
|
|
42 </command>
|
|
43 <inputs>
|
|
44 <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/>
|
|
45 <conditional name="db_opts">
|
|
46 <param name="db_opts_selector" type="select" label="Subject database/sequences">
|
|
47 <option value="db" selected="True">BLAST Database</option>
|
|
48 <option value="file">FASTA file (pairwise e-values)</option>
|
|
49 </param>
|
|
50 <when value="db">
|
|
51 <param name="database" type="select" label="Protein BLAST database">
|
|
52 <options from_file="blastdb_p.loc">
|
|
53 <column name="value" index="0"/>
|
|
54 <column name="name" index="1"/>
|
|
55 <column name="path" index="2"/>
|
|
56 </options>
|
|
57 </param>
|
|
58 <param name="subject" type="hidden" value="" />
|
|
59 </when>
|
|
60 <when value="file">
|
|
61 <param name="database" type="hidden" value="" />
|
|
62 <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/>
|
|
63 </when>
|
|
64 </conditional>
|
|
65 <param name="blast_type" type="select" display="radio" label="Type of BLAST">
|
|
66 <option value="blastp">blastp</option>
|
|
67 <option value="blastp-short">blastp-short</option>
|
|
68 </param>
|
|
69 <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
|
|
70 <param name="out_format" type="select" label="Output format">
|
|
71 <option value="6" selected="True">Tabular (standard 12 columns)</option>
|
|
72 <option value="ext">Tabular (extended 24 columns)</option>
|
|
73 <option value="5">BLAST XML</option>
|
|
74 <option value="0">Pairwise text</option>
|
|
75 <option value="0 -html">Pairwise HTML</option>
|
|
76 <option value="2">Query-anchored text</option>
|
|
77 <option value="2 -html">Query-anchored HTML</option>
|
|
78 <option value="4">Flat query-anchored text</option>
|
|
79 <option value="4 -html">Flat query-anchored HTML</option>
|
|
80 <!--
|
|
81 <option value="-outfmt 11">BLAST archive format (ASN.1)</option>
|
|
82 -->
|
|
83 </param>
|
|
84 <conditional name="adv_opts">
|
|
85 <param name="adv_opts_selector" type="select" label="Advanced Options">
|
|
86 <option value="basic" selected="True">Hide Advanced Options</option>
|
|
87 <option value="advanced">Show Advanced Options</option>
|
|
88 </param>
|
|
89 <when value="basic" />
|
|
90 <when value="advanced">
|
|
91 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
|
|
92 <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="false" />
|
|
93 <param name="matrix" type="select" label="Scoring matrix">
|
|
94 <option value="BLOSUM90">BLOSUM90</option>
|
|
95 <option value="BLOSUM80">BLOSUM80</option>
|
|
96 <option value="BLOSUM62" selected="true">BLOSUM62 (default)</option>
|
|
97 <option value="BLOSUM50">BLOSUM50</option>
|
|
98 <option value="BLOSUM45">BLOSUM45</option>
|
|
99 <option value="PAM250">PAM250</option>
|
|
100 <option value="PAM70">PAM70</option>
|
|
101 <option value="PAM30">PAM30</option>
|
|
102 </param>
|
|
103 <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer -->
|
|
104 <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits">
|
|
105 <validator type="in_range" min="0" />
|
|
106 </param>
|
|
107 <!-- I'd like word_size to be optional, with minimum 2 for blastp -->
|
|
108 <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2.">
|
|
109 <validator type="in_range" min="0" />
|
|
110 </param>
|
|
111 <!--
|
|
112 Can't use '-ungapped' on its own, error back is:
|
|
113 Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
|
|
114 Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.'
|
|
115 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
|
|
116 -->
|
|
117 <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"/>
|
|
118 </when>
|
|
119 </conditional>
|
|
120 </inputs>
|
|
121 <outputs>
|
|
122 <data name="output1" format="tabular" label="${blast_type.value_label} on ${db_opts.db_opts_selector}">
|
|
123 <change_format>
|
|
124 <when input="out_format" value="0" format="txt"/>
|
|
125 <when input="out_format" value="0 -html" format="html"/>
|
|
126 <when input="out_format" value="2" format="txt"/>
|
|
127 <when input="out_format" value="2 -html" format="html"/>
|
|
128 <when input="out_format" value="4" format="txt"/>
|
|
129 <when input="out_format" value="4 -html" format="html"/>
|
|
130 <when input="out_format" value="5" format="blastxml"/>
|
|
131 </change_format>
|
|
132 </data>
|
|
133 </outputs>
|
|
134 <requirements>
|
|
135 <requirement type="binary">blastp</requirement>
|
|
136 </requirements>
|
|
137 <tests>
|
|
138 <test>
|
|
139 <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
|
|
140 <param name="db_opts_selector" value="file" />
|
|
141 <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
|
|
142 <param name="database" value="" />
|
|
143 <param name="evalue_cutoff" value="1e-8" />
|
|
144 <param name="blast_type" value="blastp" />
|
|
145 <param name="out_format" value="5" />
|
|
146 <param name="adv_opts_selector" value="advanced" />
|
|
147 <param name="filter_query" value="False" />
|
|
148 <param name="matrix" value="BLOSUM62" />
|
|
149 <param name="max_hits" value="0" />
|
|
150 <param name="word_size" value="0" />
|
|
151 <param name="parse_deflines" value="True" />
|
|
152 <output name="output1" file="blastp_four_human_vs_rhodopsin.xml" ftype="blastxml" />
|
|
153 </test>
|
|
154 <test>
|
|
155 <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
|
|
156 <param name="db_opts_selector" value="file" />
|
|
157 <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
|
|
158 <param name="database" value="" />
|
|
159 <param name="evalue_cutoff" value="1e-8" />
|
|
160 <param name="blast_type" value="blastp" />
|
|
161 <param name="out_format" value="6" />
|
|
162 <param name="adv_opts_selector" value="advanced" />
|
|
163 <param name="filter_query" value="False" />
|
|
164 <param name="matrix" value="BLOSUM62" />
|
|
165 <param name="max_hits" value="0" />
|
|
166 <param name="word_size" value="0" />
|
|
167 <param name="parse_deflines" value="True" />
|
|
168 <output name="output1" file="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" />
|
|
169 </test>
|
|
170 <test>
|
|
171 <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
|
|
172 <param name="db_opts_selector" value="file" />
|
|
173 <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
|
|
174 <param name="database" value="" />
|
|
175 <param name="evalue_cutoff" value="1e-8" />
|
|
176 <param name="blast_type" value="blastp" />
|
|
177 <param name="out_format" value="ext" />
|
|
178 <param name="adv_opts_selector" value="advanced" />
|
|
179 <param name="filter_query" value="False" />
|
|
180 <param name="matrix" value="BLOSUM62" />
|
|
181 <param name="max_hits" value="0" />
|
|
182 <param name="word_size" value="0" />
|
|
183 <param name="parse_deflines" value="True" />
|
|
184 <output name="output1" file="blastp_four_human_vs_rhodopsin_ext.tabular" ftype="tabular" />
|
|
185 </test>
|
|
186 <test>
|
|
187 <param name="query" value="rhodopsin_proteins.fasta" ftype="fasta" />
|
|
188 <param name="db_opts_selector" value="file" />
|
|
189 <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
|
|
190 <param name="database" value="" />
|
|
191 <param name="evalue_cutoff" value="1e-8" />
|
|
192 <param name="blast_type" value="blastp" />
|
|
193 <param name="out_format" value="6" />
|
|
194 <param name="adv_opts_selector" value="basic" />
|
|
195 <output name="output1" file="blastp_rhodopsin_vs_four_human.tabular" ftype="tabular" />
|
|
196 </test>
|
|
197 </tests>
|
|
198 <help>
|
|
199
|
|
200 .. class:: warningmark
|
|
201
|
|
202 **Note**. Database searches may take a substantial amount of time.
|
|
203 For large input datasets it is advisable to allow overnight processing.
|
|
204
|
|
205 -----
|
|
206
|
|
207 **What it does**
|
|
208
|
|
209 Search a *protein database* using a *protein query*,
|
|
210 using the NCBI BLAST+ blastp command line tool.
|
|
211
|
|
212 -----
|
|
213
|
|
214 **Output format**
|
|
215
|
|
216 Because Galaxy focuses on processing tabular data, the default output of this
|
|
217 tool is tabular. The standard BLAST+ tabular output contains 12 columns:
|
|
218
|
|
219 ====== ========= ============================================
|
|
220 Column NCBI name Description
|
|
221 ------ --------- --------------------------------------------
|
|
222 1 qseqid Query Seq-id (ID of your sequence)
|
|
223 2 sseqid Subject Seq-id (ID of the database hit)
|
|
224 3 pident Percentage of identical matches
|
|
225 4 length Alignment length
|
|
226 5 mismatch Number of mismatches
|
|
227 6 gapopen Number of gap openings
|
|
228 7 qstart Start of alignment in query
|
|
229 8 qend End of alignment in query
|
|
230 9 sstart Start of alignment in subject (database hit)
|
|
231 10 send End of alignment in subject (database hit)
|
|
232 11 evalue Expectation value (E-value)
|
|
233 12 bitscore Bit score
|
|
234 ====== ========= ============================================
|
|
235
|
|
236 The BLAST+ tools can optionally output additional columns of information,
|
|
237 but this takes longer to calculate. Most (but not all) of these columns are
|
|
238 included by selecting the extended tabular output. The extra columns are
|
|
239 included *after* the standard 12 columns. This is so that you can write
|
|
240 workflow filtering steps that accept either the 12 or 24 column tabular
|
|
241 BLAST output.
|
|
242
|
|
243 ====== ============= ===========================================
|
|
244 Column NCBI name Description
|
|
245 ------ ------------- -------------------------------------------
|
|
246 13 sallseqid All subject Seq-id(s), separated by a ';'
|
|
247 14 score Raw score
|
|
248 15 nident Number of identical matches
|
|
249 16 positive Number of positive-scoring matches
|
|
250 17 gaps Total number of gaps
|
|
251 18 ppos Percentage of positive-scoring matches
|
|
252 19 qframe Query frame
|
|
253 20 sframe Subject frame
|
|
254 21 qseq Aligned part of query sequence
|
|
255 22 sseq Aligned part of subject sequence
|
|
256 23 qlen Query sequence length
|
|
257 24 slen Subject sequence length
|
|
258 ====== ============= ===========================================
|
|
259
|
|
260 The third option is BLAST XML output, which is designed to be parsed by
|
|
261 another program, and is understood by some Galaxy tools.
|
|
262
|
|
263 You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
|
|
264 The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
|
|
265 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
|
|
266 The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
|
|
267 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
|
|
268
|
|
269 -------
|
|
270
|
|
271 **References**
|
|
272
|
|
273 Altschul et al. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. 1997. Nucleic Acids Res. 25:3389-3402.
|
|
274
|
|
275 Schaffer et al. Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements. 2001. Nucleic Acids Res. 29:2994-3005.
|
|
276
|
|
277 </help>
|
|
278 </tool>
|