[solved] Retrieve fasta from balst db using blastdbcmd: Error: gi|742519789: OID not found
1
0
Entering edit mode
9.5 years ago
dago ★ 2.8k

I saw that many people had problem retrieving sequences from blast db.

I could find a way around it, so maybe someone has a god link/suggestion/reference I could use.

I want to extract sequences from nr db.

I have a list of identifier, obtained from a previous blast search

gi|740719731|ref|WP_038505017.1|
gi|740813732|ref|WP_038599015.1|
gi|740864652|ref|WP_038649903.1|
gi|740899195|ref|WP_038684443.1|
gi|740906294|ref|WP_038691542.1|

Now I try to query only

GIs:

740864652
740899195
740906294

or ref:

WP_038649903.1
WP_038684443.1
WP_038691542.1
blastdbcmd -db ~/Documents/nr_blastdb/nr -entry_batch Ids

But I get always:

Error: XXXXX: OID not found

What am I missing here?

software-error blast • 8.5k views
ADD COMMENT
3
Entering edit mode
9.5 years ago
5heikki 11k

Did you make the nr db yourself from the fasta file or download the pre-formatted db files? If former, did you apply the -parse_seqids flag? If not, there's your problem.

ADD COMMENT
0
Entering edit mode

Not quite sure. I got it from a colleague. Could it be a problem related to the index of the entries?

ADD REPLY
1
Entering edit mode

What does cat ~/Documents/nr_blastdb/nr.pal show?

If it's a pre-formatted db, the title line is something like:

TITLE All non-redundant GenBank CDS translations+PDB+SwissProt+PIR+PRF excluding environmental samples from WGS projects
ADD REPLY
0
Entering edit mode

Perfect, was a manually created db. I will try to follow your first suggestion

ADD REPLY
0
Entering edit mode

You are right, it worked fine now. However, for some seq now there are really crazy Ids, for example

> XXXXXX >XXXXX
CGSNDHIEJWPSP

It looks like two Ids one after the other. Any idea where the problem is?

ADD REPLY
1
Entering edit mode

It's a non-redundant database and those two accessions encode an identical protein. You can avoid this behavior with the -target_only flag..

ADD REPLY
0
Entering edit mode

I learned many things today! Thanks very much!!!!

ADD REPLY

Login before adding your answer.

Traffic: 2775 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6