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