[Bioperl-l] about BioPerl DB module

Mark A. Jensen maj at fortinbras.us
Fri Jan 23 13:56:51 UTC 2009

Hi Jarod-

Bio::DB::Flat is nicely generalized to allow different 'namespaces' for
the different identifiers used on different sequences. You
can choose the type of identifier you want (gi, in your case) by using
get_Seq_by_acc() as follows (this actually works on my machine):

$db = Bio::DB::Flat->new(-directory  => "$ENV{HOME}/scratch",
    -dbname     => 'mydb',
    -format     => 'genbank',
    -index      => 'bdb',
    -write_flag => 1);
$seq       = $db->get_Seq_by_acc('GI' => 71025988);

If you want to get by accession number, use get_Seq_by_acc('ACC' => $accno),

----- Original Message ----- 
From: "云 何" <jarodpardon at yahoo.com.cn>
To: <bioperl-l at lists.open-bio.org>
Sent: Tuesday, January 20, 2009 8:11 PM
Subject: [Bioperl-l] about BioPerl DB module

> Hi, all
> I have some sequence databases such as RefSeq in flat
> GenPept/GenBank format,
> while there is a list of GI number and I want extract
> the sequence from the
> database according to the GI number. How should I do?
> Using Bio::DB::Flat module to index the database? But
> there is no method
> called get_Seq_by_gi() in that module.
> Best,
> Jarod
>      ___________________________________________________________
>  好玩贺卡等你发,邮箱贺卡全新上线!
> http://card.mail.cn.yahoo.com/


> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l 

More information about the Bioperl-l mailing list