Can I limit a BLASTp search by taxonomy?
1
0
Entering edit mode
5 months ago
keki • 0

Hi everyone,

I'm trying to run BLASTp against the nr proteins database, but I would like to restrict my alignments to some given levels of taxonomy. I've been reading that with the new v5 formats of BLAST databases this can be done by using the arguments -taxid or -taxidlist, but all the examples I've seen are for BLASTn and this argument doesn't seem to be available for BLASTp. Since I can do this search on my browser, is there any way to limit my search by taxonomy in BLASTp using the terminal?

blast taxonomy blastp • 769 views
0
Entering edit mode

my search by taxonomy in BLASTp using the terminal?

As long as you are doing the search locally you can use the options @shelkmike mentions. I don't think you can use them for remote blast searches at NCBI using a local terminal.

0
Entering edit mode
5 months ago
shelkmike ▴ 920

Blastp also has options "-taxids" and "-taxidlist". At least, blastp 2.11.0 which I use.

0
Entering edit mode

Even when I'm doing my search locally I can't get the tax IDs using the arguments -taxids or -taxidlist, it retrieves N/A. I have seen that when formatting my database I should use the argument -taxid_map by adding a text file mapping sequence IDs to taxonomy IDs, but I still get N/A. I cannot filter the results looking for my IDs or anything. Any ideas?

0
Entering edit mode

You can use the update_blastdb.pl script to download prebuilt blast databases. It usually comes with a local installation of blast.

For more details, see:

https://www.ncbi.nlm.nih.gov/books/NBK62345/#blast_ftp_site.The_db_subdirectory

This is far easier than looking into building your own index with taxonomy.

0
Entering edit mode

keki : If you are searching against any of preformatted NCBI databases then you need to download the taxonomy data that is also available at the same web location where you obtained your database from.

If you are trying to do this with a local data source then you will need to build a taxonomy file yourself. This is how you will need to do that: https://www.biobam.com/taxonomic-mapping-file-make-blast-database-within-omicsbox/

0
Entering edit mode

Thank you, this can be useful for one of my local databases.

0
Entering edit mode

Does it actually limit the search though? I have a strong feeling that it's only applied to the reported hits, i.e. the query sequence is still compared against the full database..

0
Entering edit mode

What I am trying to do is a first approach to identify orthologs of some known proteins in some species and taxa, so if I do not imagine how can I do this without filtering my results by taxa. My supervisor told me to do this search and then filter the results by taxa, so I'm trying to find this way.