I know this is an old thread, but it took me a long time to figure out the same---this stuff is not well-documented. So I want to post an answer to this thread to clarify how one can achieve what's asked for in this thread (both the remote and local way).
I am using the latest version of BLAST+ (at the time of writing this post, it is version 2.7.1 available here) and I am focusing on 'nucleotides' and "Homo sapiens" in the following example.
Doing a remote BLAST alignment on a specific organism is done in the following way using the
blastn -query blast_query.fasta -db nt -remote -task blastn-short -word_size 7 -evalue 500 -perc_identity 95 -entrez_query "Homo sapiens [organism]" -outfmt 6 -out blast_result_Hsapiens.table -max_target_seqs 10 -max_hsps 5
A local BLAST alignment on a specific organism is done in this way:
You first need to have Entrez Direct installed (setting that up is extremely easy, just follow the guidelines). Then you download your desired
GI list using that tool.
esearch -db nuccore -query "Homo sapiens [organism]" | efetch -db nuccore -format uid > Hsapiens_gilist.gi
Once you have the GI list, you use the
-gilist tag to pass it to BLAST.
blastn -query blast_query.fasta -db nt -task blastn-short -word_size 7 -evalue 500 -perc_identity 95 -gilist Hsapiens_gilist.gi -outfmt 6 -out local_blast_result_Hsapiens.table -max_target_seqs 10 -max_hsps 5
Downloading the GI list can be done manually as well:
- Head over to https://www.ncbi.nlm.nih.gov
- Choose "Nucleotide" next to the search bar
- Type in "Homo sapiens [organism]" and hit the search button
- Click on Send to > Choose Destination: File > Format: GI List > Create File
2.9 years ago by
' • 280