NAME

Bio::DB::EMBL - Database object interface for EMBL entry retrieval

SYNOPSIS

 use Bio::DB::EMBL;

 $embl = new Bio::DB::EMBL;

 # remember that EMBL_ID does not equal GenBank_ID!
 $seq = $embl->get_Seq_by_id('BUM'); # EMBL ID
 print "cloneid is ", $seq->id, "\n";

 # or changeing to accession number and Fasta format ...
 $embl->request_format('fasta');
 $seq = $embl->get_Seq_by_acc('J02231'); # EMBL ACC
 print "cloneid is ", $seq->id, "\n";

 # especially when using versions, you better be prepared
 # in not getting what what want
 eval {
     $seq = $embl->get_Seq_by_version('J02231.1'); # EMBL VERSION
 }
 print "cloneid is ", $seq->id, "\n" unless $@;

 # or ... best when downloading very large files, prevents
 # keeping all of the file in memory

 # also don't want features, just sequence so let's save bandwith
 # and request Fasta sequence
 $embl = new Bio::DB::EMBL(-retrievaltype => 'tempfile' ,
			    -format => 'fasta');
 my $seqio = $embl->get_Stream_by_batch(['AC013798', 'AC021953'] );
 while( my $clone =  $seqio->next_seq ) {
	print "cloneid is ", $clone->id, "\n";
 }

DESCRIPTION

Allows the dynamic retrieval of sequence objects Bio::Seq from the EMBL database using the dbfetch script at EBI: http://www.ebi.ac.uk/cgi-bin/dbfetch.

In order to make changes transparent we have host type (currently only ebi) and location (defaults to ebi) separated out. This allows later additions of more servers in different geographical locations.

The functionality of this module is inherited from Bio::DB::DBFetch which implements Bio::DB::WebDBSeqI.

FEEDBACK

Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.

bioperl-l@bioperl.org                         - General discussion
http://bio.perl.org/MailList.html             - About the mailing lists

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via email or the web:

bioperl-bugs@bio.perl.org
http://bio.perl.org/bioperl-bugs/

AUTHOR - Heikki Lehvaslaiho

Email Heikki Lehvaslaiho <Heikki@ebi.ac.uk>

APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

Bio::DB::WebDBSeqI methods

Overriding WebDBSeqI method to help newbies to retrieve sequences. EMBL database is all too often passed RefSeq accessions. This redirects those calls. See Bio::DB::RefSeq.

get_Stream_by_acc

Title   : get_Stream_by_acc
Usage   : $seq = $db->get_Seq_by_acc([$acc1, $acc2]);
Function: Gets a series of Seq objects by accession numbers
Returns : a Bio::SeqIO stream object
Args    : $ref : a reference to an array of accession numbers for
                 the desired sequence entries
Note    : For GenBank, this just calls the same code for get_Stream_by_id()

_check_id

Title   : _check_id
Usage   : 
Function: 
Returns : A Bio::DB::RefSeq reference or throws
Args    : $id(s), $string