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

Jason Stajich jason.stajich at duke.edu
Tue Nov 2 19:36:05 EST 2004


my ($gi);

if ($hit->name =~ /gi\|(\d+)/) { $gi = $1 }

-jason
On Nov 1, 2004, at 10:08 AM, Edith Schlagenhauf wrote:

> Hi,
>
> 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..)
>
> thanks,
> Edith
>
> 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
> Bioinformatics
> Institute of Plant Biology
> University of Zurich
> Zollikerstrasse 107
> CH-8008 Zurich
> SWITZERLAND
>
> e-mail: ediths AT botinst DOT unizh DOT ch
> Tel.:	+41 1 634 82 78
> Fax :	+41 1 634 82 04
> ******************************************
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/



More information about the Bioperl-l mailing list