[Bioperl-l] help

Heikki Lehvaslaiho heikki@ebi.ac.uk
Tue, 08 Jan 2002 09:34:18 +0000


Joe,

Here is a sample script:

-------- fetch.pl -----------
use Bio::DB::GenBank;
$db = new Bio::DB::GenBank;

while (<>) {
    chomp;
    $seq = $db->get_Seq_by_acc($_);
    print $seq->id, "\n";
}
------------------------

It assumes that your accession numbers are one at a line e.g.:
----------- acc.dat -------------
J02231
J00522
------------------------

Run it

% perl fetch.pl acc.dat

and in place of the print statement put a call to a subroutine doing 
whatever you need to do with the sequence.

Read more from Bio::DB documentation and for sequence manipulation check
Bio::PrimarySeqI, Bio::PrimarySeq, Bio::Seq and Bio::Seq::RichSeq

Yours,
	-Heikki

joe wrote:
> 
> hey,everyone
>    I'm a freshman in bioperl. I have a problem,I need open local file including gene's
> entry number,and desigh a program to visit remote genbank database, return the gene's
> sequence.only i need sequence,how to gain the sequence's variable?
> 
>    thanks a lot!
> 
>               joe
>               qqqwww@21cn.com
>                  2001-12-20
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________