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