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