How to perform bidirectional BLAST?
3
0
Entering edit mode
7.5 years ago
Paul ▴ 80

I have 100s of complete genome sequences, downloaded from NCBI. And I have query gene sequences which I would like to BLAST against the complete genomes.

To perform the bidirectional BLAST, I would like to create a local database from one genome. The second genome will be queried against the database. The BLAST would be repeated by interchanging the database and query genomes.

Is there any R package to do the above?

Bidirectional Blast • 6.6k views
ADD COMMENT
0
Entering edit mode

What is the point of doing this exercise? Are you planning to transfer annotations from one strain to others?

If you are looking for genome-wide similarities/rearrangements then using mauve is perfect solution.

ADD REPLY
1
Entering edit mode
7.5 years ago
Rohit ★ 1.5k

Proteinortho does a bi-directional blast if you are looking for orthologs. Also, you can look for paralogs with self-hits and reduce false-orthologs with the synteny option using poff0extension.

ADD COMMENT
1
Entering edit mode
7.5 years ago
st.ph.n ★ 2.7k

As @Ashley stated, BLAST is by default bidirectional. Download blast+

makeblastdb -in genome1.fa -dbtype nucl
makeblastdb -in genome2.fa -dbtype nucl

blastn -query genome1.fa -db genome2.fa (-out outfilename -outfmt *N* -num_threads *N*)
blastn -query genome2.fa -db genome1.fa (-out outfilename -outfmt *N* -num_threads *N*)

For each genome in a directory, you can also make a loop that will blast each genome to the given db. If the files are not huge, you can concatenate them and run them together, if you have unique sequence headers per genome, and parse the blast results after.

I prefer outfmt 6, which is tab-delimited. From the results, you will be able to tell the direction of the alignment, based on the qstart/qend, sstaart/send values. For more parameters, blastn -help

ADD COMMENT
2
Entering edit mode

So, while the two steps outlined are the core steps to doing bi-directional blast queries, I want to point out that this is not "bidirectional by default". Bi-directional by default would imply that when you run a single blast query against a database, it would do the reverse query of the database against the query FASTA by default. This is not the case.

It may be clearer to specify that what is being done is more commonly referred to (at least back in the day when I did this routinely) as reciprocal BLAST.

ADD REPLY
0
Entering edit mode
7.5 years ago
Ashley ▴ 90

The software is default bidirectional.

ADD COMMENT
1
Entering edit mode

Hmm. I don't understand that statement. What do you mean by "default bidirectional"? While blast+ can work that way it does not do bidirectional blasts by default. Unless I am missing something.

ADD REPLY
0
Entering edit mode

could you send me a tutorial or a link of the software? since I need run it locally

ADD REPLY
1
Entering edit mode

You can use DIGS tool that automates this process and saves output to RDBMS for this. http://giffordlabcvr.github.io/DIGS-tool/

ADD REPLY

Login before adding your answer.

Traffic: 2056 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6