In legacy blast (blastall) it was easy to do a remote BLAST query from the command line that only returned hits for a single organism:
blastall -u "[Arabidopsis thaliana[organism]" -p blastp -d nr -i my_protein_input.fas -o my_protein_input_vs_nr_Athaliana.blastout.txt
However, this seems to have been removed with the release of BLAST+. Aside from filtering hits after they are returned, is it possible to perform a query on the 'nr' database that only returns hits for a single specified taxon?
1 answer
I'm having a similar problem. It seems the best option is to create your own database. Make a blast_db with the fasta file for your organism if you have it, otherwise you have to do something like this:
- Download the prebuilt nr database (ncbi?).
- Search the Entrez Protein database with query: "txid7742[ORGN]"
- Select "Send to File" and choose format "GI list"
Use the list of GIs from the previous step with the blastdb_aliastool to build an aliased blastdb of just your organism (takes several seconds), eg:
blastdb_aliastool -gilist vertebrates.gi_list.txt -db nr -out nr_vertebrates -title nr_vertebratesSearch against your new (aliased) database:
blastx -query query.fa -db nr_vertebrates
(from this thread: Vertebrate Subset Nr Database? Build My Own?)
Log in to answer this question.
I think you just add the
-remoteflag and use-entrez_queryinsteadHow can use more than one species in the remote search.
Thanks