Mercurial > repos > peterjc > blast_rbh
annotate tools/blast_rbh/blast_rbh.xml @ 7:493243f8eb88 draft
Uploaded v0.1.0g, check return code
author | peterjc |
---|---|
date | Wed, 21 May 2014 06:40:30 -0400 |
parents | e47960bcdccb |
children | d3eb5cda7270 |
rev | line source |
---|---|
0 | 1 <tool id="blast_reciprocal_best_hits" name="BLAST Reciprocal Best Hits (RBH)" version="0.1.0"> |
2 <description>from two FASTA files</description> | |
3 <requirements> | |
4 <requirement type="binary">makeblastdb</requirement> | |
5 <requirement type="binary">blastp</requirement> | |
6 <requirement type="binary">blastn</requirement> | |
7 <requirement type="package" version="2.2.29">blast+</requirement> | |
8 </requirements> | |
9 <version_command interpreter="python"> | |
10 blast_rbh.py --version | |
11 </version_command> | |
12 <command interpreter="python"> | |
13 blast_rbh.py "$fasta_a" "$fasta_b" $seq.dbtype | |
14 #if $seq.dbtype=="nucl" | |
15 $seq.nucl_type | |
16 #else | |
17 $seq.prot_type | |
18 #end if | |
19 $identity $q_cover "$output" | |
20 </command> | |
7 | 21 <stdio> |
22 <!-- Anything other than zero is an error --> | |
23 <exit_code range="1:" /> | |
24 <exit_code range=":-1" /> | |
25 </stdio> | |
0 | 26 <inputs> |
27 <!-- Galaxy does not have sub-types for protein vs nucletide FASTA --> | |
28 <param name="fasta_a" type="data" format="fasta" | |
29 label="Genes/proteins from species A" | |
30 description="FASTA file, one sequence per gene/protein." /> | |
31 <param name="fasta_b" type="data" format="fasta" | |
32 label="Genes/proteins from species B" | |
33 description="FASTA file, one sequence per gene/protein." /> | |
34 <conditional name="seq"> | |
35 <param name="dbtype" type="select" label="Molecule type of FASTA inputs"> | |
36 <option value="prot">protein</option> | |
37 <option value="nucl">nucleotide</option> | |
38 </param> | |
39 <when value="prot"> | |
40 <param name="prot_type" type="select" display="radio" label="Type of BLAST"> | |
41 <option value="blastp">blastp - Traditional BLASTP to compare a protein query to a protein database</option> | |
42 <option value="blastp-short">blastp-short - BLASTP optimized for queries shorter than 30 residues</option> | |
43 </param> | |
44 </when> | |
45 <when value="nucl"> | |
46 <param name="nucl_type" type="select" display="radio" label="Type of BLAST"> | |
47 <option value="megablast">megablast - Traditional megablast used to find very similar (e.g., intraspecies or closely related species) sequences</option> | |
48 <option value="blastn">blastn - Traditional BLASTN requiring an exact match of 11, for somewhat similar sequences</option> | |
49 <option value="blastn-short">blastn-short - BLASTN program optimized for sequences shorter than 50 bases</option> | |
50 <option value="dc-megablast">dc-megablast - Discontiguous megablast used to find more distant (e.g., interspecies) sequences</option> | |
4
57245c11b8cb
Uploaded v0.1.0d, TBLASTX support; changed output columns
peterjc
parents:
2
diff
changeset
|
51 <option value="tblastx">tblastx - TBLASTX program using translated query against translated database (protein level matches)</option> |
0 | 52 </param> |
53 </when> | |
54 </conditional> | |
55 <param name="identity" type="float" value="70" min="0" max="100" | |
56 label="Minimum percentage identity for BLAST matches" | |
57 help="Default is 70%, use 0 for no filtering." /> | |
58 <param name="q_cover" type="float" value="50" min="0" max="100" | |
59 label="Minimum percentage query coverage for BLAST matches" | |
60 help="Default is 50%, use 0 for no filtering." /> | |
61 </inputs> | |
62 <outputs> | |
63 <data name="output" format="tabular" label="BLAST RBH: $fasta_a.name vs $fasta_b.name" /> | |
64 </outputs> | |
65 <requirements> | |
66 </requirements> | |
67 <tests> | |
68 <test> | |
1 | 69 <param name="fasta_a" value="four_human_proteins.fasta" ftype="fasta"/> |
70 <param name="fasta_b" value="rhodopsin_proteins.fasta" ftype="fasta"/> | |
71 <param name="dbtype" value="prot"/> | |
72 <param name="nucl_type" value="blastp"/> | |
73 <param name="identity" value="0.0"/> | |
74 <param name="q_cover" value="0.0"/> | |
75 <output name="output" file="rbh_blastp_four_human_vs_rhodopsin_proteins.tabular" ftype="tabular"/> | |
76 </test> | |
77 <test> | |
0 | 78 <param name="fasta_a" value="rhodopsin_nucs.fasta" ftype="fasta"/> |
79 <param name="fasta_b" value="three_human_mRNA.fasta" ftype="fasta"/> | |
80 <param name="dbtype" value="nucl"/> | |
81 <param name="nucl_type" value="megablast"/> | |
82 <param name="identity" value="0.0"/> | |
83 <param name="q_cover" value="0.0"/> | |
84 <output name="output" file="rbh_megablast_rhodopsin_nucs_vs_three_human_mRNA.tabular" ftype="tabular"/> | |
85 </test> | |
86 <test> | |
87 <param name="fasta_a" value="rhodopsin_nucs.fasta" ftype="fasta"/> | |
88 <param name="fasta_b" value="three_human_mRNA.fasta" ftype="fasta"/> | |
89 <param name="dbtype" value="nucl"/> | |
90 <param name="nucl_type" value="megablast"/> | |
91 <param name="identity" value="92"/> | |
92 <param name="q_cover" value="86"/> | |
93 <output name="output" file="rbh_megablast_rhodopsin_nucs_vs_three_human_mRNA.tabular" ftype="tabular"/> | |
94 </test> | |
95 <!-- push the percentage identity over the 92.07% level --> | |
96 <test> | |
97 <param name="fasta_a" value="rhodopsin_nucs.fasta" ftype="fasta"/> | |
98 <param name="fasta_b" value="three_human_mRNA.fasta" ftype="fasta"/> | |
99 <param name="dbtype" value="nucl"/> | |
100 <param name="nucl_type" value="megablast"/> | |
101 <param name="identity" value="92.5"/> | |
102 <param name="q_cover" value="86"/> | |
103 <output name="output" file="rbh_none.tabular" ftype="tabular"/> | |
104 </test> | |
105 <!-- push the coverage over the 86% level --> | |
106 <test> | |
107 <param name="fasta_a" value="rhodopsin_nucs.fasta" ftype="fasta"/> | |
108 <param name="fasta_b" value="three_human_mRNA.fasta" ftype="fasta"/> | |
109 <param name="dbtype" value="nucl"/> | |
110 <param name="nucl_type" value="megablast"/> | |
111 <param name="identity" value="92"/> | |
112 <param name="q_cover" value="87"/> | |
113 <output name="output" file="rbh_none.tabular" ftype="tabular"/> | |
114 </test> | |
115 <test> | |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
116 <param name="fasta_a" value="rhodopsin_nucs.fasta" ftype="fasta"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
117 <param name="fasta_b" value="three_human_mRNA.fasta" ftype="fasta"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
118 <param name="dbtype" value="nucl"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
119 <param name="nucl_type" value="tblastx"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
120 <param name="identity" value="0.0"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
121 <param name="q_cover" value="0.0"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
122 <output name="output" file="rbh_tblastx_rhodopsin_nucs_vs_three_human_mRNA.tabular" ftype="tabular"/> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
123 </test> |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
124 <test> |
0 | 125 <param name="fasta_a" value="three_human_mRNA.fasta" ftype="fasta"/> |
126 <param name="fasta_b" value="rhodopsin_nucs.fasta" ftype="fasta"/> | |
127 <param name="dbtype" value="nucl"/> | |
128 <param name="nucl_type" value="blastn"/> | |
129 <param name="identity" value="0.0"/> | |
130 <param name="q_cover" value="0.0"/> | |
131 <output name="output" file="rbh_blastn_three_human_mRNA_vs_rhodopsin_nucs.tabular" ftype="tabular"/> | |
132 </test> | |
6 | 133 <!-- this pair of examples test tied best hits --> |
134 <test> | |
135 <param name="fasta_a" value="k12_ten_proteins.fasta" ftype="fasta"/> | |
136 <param name="fasta_b" value="k12_edited_proteins.fasta" ftype="fasta"/> | |
137 <param name="dbtype" value="nprot"/> | |
138 <param name="nucl_type" value="blastp"/> | |
139 <param name="identity" value="0.0"/> | |
140 <param name="q_cover" value="0.0"/> | |
141 <output name="output" file="rbh_blastp_k12.tabular" ftype="tabular"/> | |
142 </test> | |
143 <test> | |
144 <param name="fasta_a" value="k12_edited_proteins.fasta" ftype="fasta"/> | |
145 <param name="fasta_b" value="k12_ten_proteins.fasta" ftype="fasta"/> | |
146 <param name="dbtype" value="nprot"/> | |
147 <param name="nucl_type" value="blastp"/> | |
148 <param name="identity" value="0.0"/> | |
149 <param name="q_cover" value="0.0"/> | |
150 <output name="output" file="rbh_blastp_k12.tabular" ftype="tabular"/> | |
151 </test> | |
0 | 152 </tests> |
153 <help> | |
154 **What it does** | |
155 | |
2 | 156 Takes two FASTA files (*species A* and *species B*), builds a BLAST database |
0 | 157 for each, runs reciprocal BLAST searchs (*A vs B*, and *B vs A*), optionally |
2 | 158 filters the HSPs, and then compiles a list of the reciprocal best hits (RBH). |
0 | 159 |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
160 The output from this tool is a tabular file containing multiple columns, with |
2 | 161 information about the BLAST matches used: |
0 | 162 |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
163 ====== ================================== |
0 | 164 Column Description |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
165 ------ ---------------------------------- |
2 | 166 1 ID from *species A* |
167 2 ID from *species B* | |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
168 3 Length of sequence *A* |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
169 4 Length of sequence *B* |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
170 5 Percentage of sequence *A* covered |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
171 6 Percentage of sequence *B* covered |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
172 7 HSP alignment length |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
173 8 HSP percentage identity |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
174 9 HSP bitscore |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
175 ====== ================================== |
2 | 176 |
5
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
177 These values correspond to the ``qseqid``/``sseqid``, ``qlen``/``slen``, |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
178 ``qcovhsp``, ``length``, ``pident`` and ``bitscore`` values in the BLAST+ |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
179 tabular output. |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
180 |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
181 For the alignment length, bitscore and percentage identity the values for |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
182 *A vs B* and *B vs A* are typically the same, so their minimum is shown. |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
183 The coverage values are given by the HSP alignment length divided by the |
c84b6c21e3d4
Uploaded v0.1.0e, test TBLASTX mode; more columns in output
peterjc
parents:
4
diff
changeset
|
184 sequence length (adjusted by a factor of three for TBLASTX). |
0 | 185 |
6 | 186 Note that if a sequence has equally scoring top BLAST matches to multiple |
187 sequence in the other file, it will not be considered for an RBH. This | |
188 can happen following gene duplication, or for (near) identical gene | |
189 duplicates. | |
190 | |
0 | 191 .. class:: warningmark |
192 | |
193 **Note** | |
194 | |
195 If you are trying to use BLAST RBH matches to identify candidate orthologues | |
196 or transfer annotation, you *must* use a percentage identity and minimum | |
197 coverage threshold or similiar. See: | |
198 | |
199 Punta and Ofran (2008) The Rough Guide to In Silico Function Prediction, | |
200 or How To Use Sequence and Structure Information To Predict Protein | |
201 Function. PLoS Comput Biol 4(10): e1000160. | |
202 http://dx.doi.org/10.1371/journal.pcbi.1000160 | |
203 | |
204 The defaults are to require 70% sequence identity over the aligned region | |
205 (using ``pident`` in the BLAST+ tabular output), and that the HSP alignment | |
206 covers at least 50% of the query sequence (using ``qcovhsp`` in the BLAST+ | |
207 tabular output). | |
208 | |
209 | |
210 **References** | |
211 | |
212 A specific paper covering this tool is planned, but please also cite: | |
213 | |
214 Christiam Camacho et al. (2009). | |
215 BLAST+: architecture and applications. | |
216 BMC Bioinformatics. 15;10:421. | |
217 http://dx.doi.org/10.1186/1471-2105-10-421 | |
218 | |
219 This wrapper is available to install into other Galaxy Instances via the Galaxy | |
220 Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/blast_rbh | |
221 </help> | |
222 </tool> |