1 | <tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="0.0.1"> |
---|
2 | <description>Search translated nucleotide database with translated nucleotide query sequence(s)</description> |
---|
3 | <command> |
---|
4 | ## The command is a Cheetah template which allows some Python based syntax. |
---|
5 | ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces |
---|
6 | tblastx |
---|
7 | -query "$query" |
---|
8 | #if $db_opts.db_opts_selector == "db": |
---|
9 | -db "$db_opts.database" |
---|
10 | #else: |
---|
11 | -subject "$db_opts.subject" |
---|
12 | #end if |
---|
13 | -evalue $evalue_cutoff |
---|
14 | $adv_opts.filter_query |
---|
15 | $adv_opts.strand |
---|
16 | $adv_opts.matrix |
---|
17 | -out $output1 |
---|
18 | $out_format |
---|
19 | -num_threads 8 |
---|
20 | ## Need int(str(...)) because $adv_opts.max_hits is an InputValueWrapper object not a string |
---|
21 | ## Note -max_target_seqs overrides -num_descriptions and -num_alignments |
---|
22 | #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0): |
---|
23 | -max_target_seqs $adv_opts.max_hits |
---|
24 | #end if |
---|
25 | #if (str($adv_opts.word_size) and int(str($adv_opts.word_size)) > 0): |
---|
26 | -word_size $adv_opts.word_size |
---|
27 | #end if |
---|
28 | </command> |
---|
29 | <inputs> |
---|
30 | <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> |
---|
31 | <conditional name="db_opts"> |
---|
32 | <param name="db_opts_selector" type="select" label="Subject database/sequences"> |
---|
33 | <option value="db" selected="True">BLAST Database</option> |
---|
34 | <option value="file">FASTA file</option> |
---|
35 | </param> |
---|
36 | <when value="db"> |
---|
37 | <param name="database" type="select" label="Nucleotide BLAST database"> |
---|
38 | <options from_file="blastdb.loc"> |
---|
39 | <column name="name" index="0"/> |
---|
40 | <column name="value" index="1"/> |
---|
41 | </options> |
---|
42 | </param> |
---|
43 | <param name="subject" type="hidden" value="" /> |
---|
44 | </when> |
---|
45 | <when value="file"> |
---|
46 | <param name="database" type="hidden" value="" /> |
---|
47 | <param name="subject" type="data" format="fasta" label="Nucleotide FASTA file to use as database"/> |
---|
48 | </when> |
---|
49 | </conditional> |
---|
50 | <param name="evalue_cutoff" type="float" size="15" value="0.001" label="set expectation value cutoff" /> |
---|
51 | <param name="out_format" type="select" label="Output format"> |
---|
52 | <option value="-outfmt 6" selected="True">Tabular</option> |
---|
53 | <option value="-outfmt 5">BLAST XML</option> |
---|
54 | <option value="-outfmt 0">Pairwise text</option> |
---|
55 | <option value="-outfmt 0 -html">Pairwise HTML</option> |
---|
56 | <option value="-outfmt 2">Query-anchored text</option> |
---|
57 | <option value="-outfmt 2 -html">Query-anchored HTML</option> |
---|
58 | <option value="-outfmt 4">Flat query-anchored text</option> |
---|
59 | <option value="-outfmt 4 -html">Flat query-anchored HTML</option> |
---|
60 | <!-- |
---|
61 | <option value="-outfmt 11">BLAST archive format (ASN.1)</option> |
---|
62 | --> |
---|
63 | </param> |
---|
64 | <conditional name="adv_opts"> |
---|
65 | <param name="adv_opts_selector" type="select" label="Advanced Options"> |
---|
66 | <option value="basic" selected="True">Hide Advanced Options</option> |
---|
67 | <option value="advanced">Show Advanced Options</option> |
---|
68 | </param> |
---|
69 | <when value="basic"> |
---|
70 | <param name="filter_query" type="hidden" value="" /> |
---|
71 | <param name="strand" type="hidden" value="" /> |
---|
72 | <param name="matrix" type="hidden" value="" /> |
---|
73 | <param name="max_hits" type="hidden" value="" /> |
---|
74 | <param name="word_size" type="hidden" value="" /> |
---|
75 | </when> |
---|
76 | <when value="advanced"> |
---|
77 | <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' --> |
---|
78 | <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="true" /> |
---|
79 | <param name="strand" type="select" label="Query strand(s) to search against database/subject"> |
---|
80 | <option value="-strand both">Both</option> |
---|
81 | <option value="-strand plus">Plus (forward)</option> |
---|
82 | <option value="-strand minus">Minus (reverse complement)</option> |
---|
83 | </param> |
---|
84 | <param name="matrix" type="select" label="Scoring matrix"> |
---|
85 | <option value="-matrix BLOSUM90">BLOSUM90</option> |
---|
86 | <option value="-matrix BLOSUM80">BLOSUM80</option> |
---|
87 | <option value="-matrix BLOSUM62" selected="true">BLOSUM62 (default)</option> |
---|
88 | <option value="-matrix BLOSUM50">BLOSUM50</option> |
---|
89 | <option value="-matrix BLOSUM45">BLOSUM45</option> |
---|
90 | <option value="-matrix PAM250">PAM250</option> |
---|
91 | <option value="-matrix PAM70">PAM70</option> |
---|
92 | <option value="-matrix PAM30">PAM30</option> |
---|
93 | </param> |
---|
94 | <!-- Why doesn't optional override a validator? I want to accept an empty string OR a non-negative integer --> |
---|
95 | <param name="max_hits" type="integer" value="0" label="Maximum hits to show" help="Use zero for default limits"> |
---|
96 | <validator type="in_range" min="0" /> |
---|
97 | </param> |
---|
98 | <!-- I'd like word_size to be optional, with minimum 2 for tblastx --> |
---|
99 | <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 2."> |
---|
100 | <validator type="in_range" min="0" /> |
---|
101 | </param> |
---|
102 | </when> |
---|
103 | </conditional> |
---|
104 | </inputs> |
---|
105 | <outputs> |
---|
106 | <data name="output1" format="tabular" label="tblastx on ${db_opts.db_opts_selector}"> |
---|
107 | <change_format> |
---|
108 | <when input="out_format" value="-outfmt 0" format="txt"/> |
---|
109 | <when input="out_format" value="-outfmt 0 -html" format="html"/> |
---|
110 | <when input="out_format" value="-outfmt 2" format="txt"/> |
---|
111 | <when input="out_format" value="-outfmt 2 -html" format="html"/> |
---|
112 | <when input="out_format" value="-outfmt 4" format="txt"/> |
---|
113 | <when input="out_format" value="-outfmt 4 -html" format="html"/> |
---|
114 | <when input="out_format" value="-outfmt 5" format="blastxml"/> |
---|
115 | </change_format> |
---|
116 | </data> |
---|
117 | </outputs> |
---|
118 | <requirements> |
---|
119 | <requirement type="binary">blastn</requirement> |
---|
120 | </requirements> |
---|
121 | <tests> |
---|
122 | <test> |
---|
123 | <param name="input_query" value="megablast_wrapper_test1.fa" ftype="fasta"/> |
---|
124 | <!-- database needs to match the entry in the blastdb.loc file (first column), which includes the last update date if appropriate --> |
---|
125 | <param name="database" value="phiX" /> |
---|
126 | <param name="blast_type" value="megablast" /> |
---|
127 | <!-- |
---|
128 | <param name="word_size" value="28" /> |
---|
129 | <param name="iden_cutoff" value="99.0" /> |
---|
130 | --> |
---|
131 | <param name="evalue_cutoff" value="10.0" /> |
---|
132 | <param name="filter_query" value="yes" /> |
---|
133 | <param name="out_format" value="-outfmt 6" /> |
---|
134 | <output name="output1" file="megablast_wrapper_test1.out"/> |
---|
135 | </test> |
---|
136 | </tests> |
---|
137 | <help> |
---|
138 | |
---|
139 | .. class:: warningmark |
---|
140 | |
---|
141 | **Note**. Database searches may take substantial amount of time. For large input datasets it is advisable to allow overnight processing. |
---|
142 | |
---|
143 | ----- |
---|
144 | |
---|
145 | **What it does** |
---|
146 | |
---|
147 | Search a *translated nucleotide database* using a *protein query*, |
---|
148 | using the NCBI BLAST+ tblastx command line tool. |
---|
149 | |
---|
150 | ----- |
---|
151 | |
---|
152 | **Output format** |
---|
153 | |
---|
154 | Because Galaxy focuses on processing tabular data, the default output of this tool is tabular. This contains 12 columns: |
---|
155 | |
---|
156 | 1. Id of your sequence |
---|
157 | 2. GI of the database hit |
---|
158 | 3. % identity |
---|
159 | 4. Alignment length |
---|
160 | 5. # mismatches |
---|
161 | 6. # gaps |
---|
162 | 7. Start position in your sequence |
---|
163 | 8. End position in your sequence |
---|
164 | 9. Start position in database hit |
---|
165 | 10. End position in database hit |
---|
166 | 11. E-value |
---|
167 | 12. Bit score |
---|
168 | |
---|
169 | The second option is BLAST XML output, which is designed to be parsed by another program, and is understood by other Galaxy tools. |
---|
170 | |
---|
171 | You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program). |
---|
172 | The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website. |
---|
173 | The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query. |
---|
174 | The two query anchored outputs show a multiple sequence alignment between the query and all the matches, |
---|
175 | and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences). |
---|
176 | |
---|
177 | ------- |
---|
178 | |
---|
179 | **References** |
---|
180 | |
---|
181 | Altschul et al. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. 1997. Nucleic Acids Res. 25:3389-3402. |
---|
182 | |
---|
183 | </help> |
---|
184 | </tool> |
---|