0
|
1 <tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="0.0.11">
|
|
2 <description>Search protein database with translated nucleotide query sequence(s)</description>
|
|
3 <!-- If job splitting is enabled, break up the query file into four -->
|
|
4 <parallelism method="multi" split_inputs="query" split_mode="number_of_parts" split_size="4" shared_inputs="subject" merge_outputs="output1"></parallelism>
|
|
5 <version_command>blastx -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 blastx
|
|
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 -evalue $evalue_cutoff
|
|
17 -out $output1
|
|
18 ##Set the extended list here so if/when we add things, saved workflows are not affected
|
|
19 #if str($out_format)=="ext":
|
|
20 -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen"
|
|
21 #else:
|
|
22 -outfmt $out_format
|
|
23 #end if
|
|
24 -num_threads 8
|
|
25 #if $adv_opts.adv_opts_selector=="advanced":
|
|
26 $adv_opts.filter_query
|
|
27 $adv_opts.strand
|
|
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 $adv_opts.ungapped
|
|
38 $adv_opts.parse_deflines
|
|
39 ## End of advanced options:
|
|
40 #end if
|
|
41 </command>
|
|
42 <inputs>
|
|
43 <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
|
|
44 <conditional name="db_opts">
|
|
45 <param name="db_opts_selector" type="select" label="Subject database/sequences">
|
|
46 <option value="db" selected="True">BLAST Database</option>
|
|
47 <option value="file">FASTA file</option>
|
|
48 </param>
|
|
49 <when value="db">
|
|
50 <param name="database" type="select" label="Protein BLAST database">
|
|
51 <options from_file="blastdb_p.loc">
|
|
52 <column name="value" index="0"/>
|
|
53 <column name="name" index="1"/>
|
|
54 <column name="path" index="2"/>
|
|
55 </options>
|
|
56 </param>
|
|
57 <param name="subject" type="hidden" value="" />
|
|
58 </when>
|
|
59 <when value="file">
|
|
60 <param name="database" type="hidden" value="" />
|
|
61 <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/>
|
|
62 </when>
|
|
63 </conditional>
|
|
64 <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
|
|
65 <param name="out_format" type="select" label="Output format">
|
|
66 <option value="6" selected="True">Tabular (standard 12 columns)</option>
|
|
67 <option value="ext">Tabular (extended 24 columns)</option>
|
|
68 <option value="5">BLAST XML</option>
|
|
69 <option value="0">Pairwise text</option>
|
|
70 <option value="0 -html">Pairwise HTML</option>
|
|
71 <option value="2">Query-anchored text</option>
|
|
72 <option value="2 -html">Query-anchored HTML</option>
|
|
73 <option value="4">Flat query-anchored text</option>
|
|
74 <option value="4 -html">Flat query-anchored HTML</option>
|
|
75 <!--
|
|
76 <option value="-outfmt 11">BLAST archive format (ASN.1)</option>
|
|
77 -->
|
|
78 </param>
|
|
79 <conditional name="adv_opts">
|
|
80 <param name="adv_opts_selector" type="select" label="Advanced Options">
|
|
81 <option value="basic" selected="True">Hide Advanced Options</option>
|
|
82 <option value="advanced">Show Advanced Options</option>
|
|
83 </param>
|
|
84 <when value="basic" />
|
|
85 <when value="advanced">
|
|
86 <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
|
|
87 <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="true" />
|
|
88 <param name="strand" type="select" label="Query strand(s) to search against database/subject">
|
|
89 <option value="-strand both">Both</option>
|
|
90 <option value="-strand plus">Plus (forward)</option>
|
|
91 <option value="-strand minus">Minus (reverse complement)</option>
|
|
92 </param>
|
|
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 blastx -->
|
|
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 <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
|
|
112 <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"/>
|
|
113 </when>
|
|
114 </conditional>
|
|
115 </inputs>
|
|
116 <outputs>
|
|
117 <data name="output1" format="tabular" label="blastx on ${db_opts.db_opts_selector}">
|
|
118 <change_format>
|
|
119 <when input="out_format" value="0" format="txt"/>
|
|
120 <when input="out_format" value="0 -html" format="html"/>
|
|
121 <when input="out_format" value="2" format="txt"/>
|
|
122 <when input="out_format" value="2 -html" format="html"/>
|
|
123 <when input="out_format" value="4" format="txt"/>
|
|
124 <when input="out_format" value="4 -html" format="html"/>
|
|
125 <when input="out_format" value="5" format="blastxml"/>
|
|
126 </change_format>
|
|
127 </data>
|
|
128 </outputs>
|
|
129 <requirements>
|
|
130 <requirement type="package" version="2.2.26+">blast+</requirement>
|
|
131 </requirements>
|
|
132 <tests>
|
|
133 <test>
|
|
134 <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
|
|
135 <param name="db_opts_selector" value="file" />
|
|
136 <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
|
|
137 <param name="database" value="" />
|
|
138 <param name="evalue_cutoff" value="1e-10" />
|
|
139 <param name="out_format" value="5" />
|
|
140 <param name="adv_opts_selector" value="basic" />
|
|
141 <output name="output1" file="blastx_rhodopsin_vs_four_human.xml" ftype="blastxml" />
|
|
142 </test>
|
|
143 <test>
|
|
144 <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
|
|
145 <param name="db_opts_selector" value="file" />
|
|
146 <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
|
|
147 <param name="database" value="" />
|
|
148 <param name="evalue_cutoff" value="1e-10" />
|
|
149 <param name="out_format" value="6" />
|
|
150 <param name="adv_opts_selector" value="basic" />
|
|
151 <output name="output1" file="blastx_rhodopsin_vs_four_human.tabular" ftype="tabular" />
|
|
152 </test>
|
|
153 <test>
|
|
154 <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
|
|
155 <param name="db_opts_selector" value="file" />
|
|
156 <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
|
|
157 <param name="database" value="" />
|
|
158 <param name="evalue_cutoff" value="1e-10" />
|
|
159 <param name="out_format" value="ext" />
|
|
160 <param name="adv_opts_selector" value="basic" />
|
|
161 <output name="output1" file="blastx_rhodopsin_vs_four_human_ext.tabular" ftype="tabular" />
|
|
162 </test>
|
|
163 </tests>
|
|
164 <help>
|
|
165
|
|
166 .. class:: warningmark
|
|
167
|
|
168 **Note**. Database searches may take a substantial amount of time.
|
|
169 For large input datasets it is advisable to allow overnight processing.
|
|
170
|
|
171 -----
|
|
172
|
|
173 **What it does**
|
|
174
|
|
175 Search a *protein database* using a *translated nucleotide query*,
|
|
176 using the NCBI BLAST+ blastx command line tool.
|
|
177
|
|
178 -----
|
|
179
|
|
180 **Output format**
|
|
181
|
|
182 Because Galaxy focuses on processing tabular data, the default output of this
|
|
183 tool is tabular. The standard BLAST+ tabular output contains 12 columns:
|
|
184
|
|
185 ====== ========= ============================================
|
|
186 Column NCBI name Description
|
|
187 ------ --------- --------------------------------------------
|
|
188 1 qseqid Query Seq-id (ID of your sequence)
|
|
189 2 sseqid Subject Seq-id (ID of the database hit)
|
|
190 3 pident Percentage of identical matches
|
|
191 4 length Alignment length
|
|
192 5 mismatch Number of mismatches
|
|
193 6 gapopen Number of gap openings
|
|
194 7 qstart Start of alignment in query
|
|
195 8 qend End of alignment in query
|
|
196 9 sstart Start of alignment in subject (database hit)
|
|
197 10 send End of alignment in subject (database hit)
|
|
198 11 evalue Expectation value (E-value)
|
|
199 12 bitscore Bit score
|
|
200 ====== ========= ============================================
|
|
201
|
|
202 The BLAST+ tools can optionally output additional columns of information,
|
|
203 but this takes longer to calculate. Most (but not all) of these columns are
|
|
204 included by selecting the extended tabular output. The extra columns are
|
|
205 included *after* the standard 12 columns. This is so that you can write
|
|
206 workflow filtering steps that accept either the 12 or 24 column tabular
|
|
207 BLAST output.
|
|
208
|
|
209 ====== ============= ===========================================
|
|
210 Column NCBI name Description
|
|
211 ------ ------------- -------------------------------------------
|
|
212 13 sallseqid All subject Seq-id(s), separated by a ';'
|
|
213 14 score Raw score
|
|
214 15 nident Number of identical matches
|
|
215 16 positive Number of positive-scoring matches
|
|
216 17 gaps Total number of gaps
|
|
217 18 ppos Percentage of positive-scoring matches
|
|
218 19 qframe Query frame
|
|
219 20 sframe Subject frame
|
|
220 21 qseq Aligned part of query sequence
|
|
221 22 sseq Aligned part of subject sequence
|
|
222 23 qlen Query sequence length
|
|
223 24 slen Subject sequence length
|
|
224 ====== ============= ===========================================
|
|
225
|
|
226 The third option is BLAST XML output, which is designed to be parsed by
|
|
227 another program, and is understood by some Galaxy tools.
|
|
228
|
|
229 You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
|
|
230 The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
|
|
231 The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
|
|
232 The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
|
|
233 and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
|
|
234
|
|
235 -------
|
|
236
|
|
237 **References**
|
|
238
|
|
239 Altschul et al. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. 1997. Nucleic Acids Res. 25:3389-3402.
|
|
240
|
|
241 </help>
|
|
242 </tool>
|