Re [Bioperl-l] Parsing Blast reports: GI number of a hit ?

Edith Schlagenhauf ediths at
Mon Nov 1 10:08:52 EST 2004


thanks for the information. Is there a method like $hit->gi_number()
to get gi numbers from a Blast report? (I havent found anything so far..)


On Oct 28, 2004, at 9:44 AM, Edith Schlagenhauf wrote:

> b) is there a more convenient way to get gi numbers from accession
> numbers using Bioperl?

Well NCBI provides the resource so would be their call.  you can
generate a accession to gi lookup table by grepping through your blast
db and pulling out the gi number and accession, save this in a file and
build a persistent lookup DB with DB_File or something equivalent.
That is what I'd do if I am doing lots of these lookups.

Of course if you are trying to do this for BLAST results you can have
the GI number in the report if you specify just add the
-I T option in your blastall command -- from the blastall docs:

   -I  Show GI's in deflines [T/F]

Dr Edith Schlagenhauf
Institute of Plant Biology
University of Zurich
Zollikerstrasse 107
CH-8008 Zurich

e-mail: ediths AT botinst DOT unizh DOT ch
Tel.:	+41 1 634 82 78
Fax :	+41 1 634 82 04

More information about the Bioperl-l mailing list