comparison tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml @ 0:9071e359b9a3

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