I do not have the cog database installed on my machine, but some tests with blastp instead of rpsblast indicate, that it is neccessary to put every GI number in a separate line:
echo 'gi|292833481\ngi|383341230\n' | blastp -task blastp-fast -remote -db nr -outfmt 6
The above command will emit lots of error messages, but after 10 min it has finished successfully.
Another test case to prove the ability of the local blast client to lookup GI numbers and retrieve sequences from NCBI :
echo 'gi|114050348\n' > q.txt
echo 'gi|57284222\n' > s.txt
blastn -query q.txt -subject s.txt -outfmt 6
We specify two sequences by their GI numbers, and then blast the shorter query sequence against the longer subject (like the deprecated bl2seq). The expected outcome is:
AB234058.1 CP000046.1 99.888 889 1 0 1 889 1666415 1665527 0.0 1637
Nevertheless, I regard this automatic sequence retrieval by the local blast client as not really stable and mature.
inloraj, if you already have a list of GI numbers, than you can easily download the sequences with Eutils efetch, and then feed them into rpsblast.
wget 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&rettype=fasta&retmode=txt&id=gi|292833481,gi|383341230,gi|292833481' -O queries.fas
NCBI has stopped using
ginumbers externally since September 2016. You should substitute theginumbers withaccession numbers.This is probably THE correct answer to this question.
Thank you for your response! Unfortunately, I didn't see any improvement when I converted my query from gi number to accession (eg EFL06024.1). The error regarding "Protein BLAST database 'Cog/Cog nr' does not exist in the NCBI servers" still there....
How old is your
rps-blast? From https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMDWeb&PAGE_TYPE=BlastNews:NCBI is hiding GI numbers from inexperienced kids now, but you can still use them in blast queries and eutils. (see below)
I could reproduce your problem using a valid identifier, maybe it is a bug? Valid identifier worked online.
Fast solution is download the sequences of interest, and use a fasta file.
edit: are you using
rpsblastorrpsblast+?Hi h.mon, I'm using rpsblast+ from blast+ package 2.5.0 and 2.6.0(latest). Yes, I suppose downloading fasta files will be the quickest solution, although my queries are rather large (>700K). NCBI's CD-search accept gi/accession number as query (https://www.ncbi.nlm.nih.gov/Structure/bwrpsb/bwrpsb.cgi) but they only allow 4000 queries each time :/ I've emailed ncbi-help and will update accordingly. Thanks for your help!
Shouldn't you edit your post then? If I try
rpsblastinstead ofrpsblast+, I get a lot of errors due to incorrect parsing of the arguments.