This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can I limit a BLASTp search by taxonomy?

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?

Thank you in advance.

blast taxonomy blastp

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.

1 answer

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

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?

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

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..

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.

Log in to answer this question.