Bio::Parser::Homologene::SerialDatabase v1.3
Bio::Parser::Homologene::SerialDatabase - NCBI Homologene
use Bio::Parser::Homologene::SerialDatabase;
my $datafile = '/usr/local/data/homologene_serialdatabase.storable';
my $sdb = Bio::Parser::Homologene::SerialDatabase->new(
'-storable' => $datafile );
while (my $hgo = $sdb->next_record) {
# $hgo is a Bio::Parser::Homologene::Record object.
}
This module can be used to read and manipulate an Homologene SerialDatabase.
A SerialDatabase is a single perl object that contains all of the
Homologene
records as objects plus some methods to access them by ID number or to
traverse through them in the order they occurred in the original
homologene.data file.
new()
my $sdb = Bio::Parser::Homologene::SerialDatabase->new();
my $sdb = Bio::Parser::Homologene::SerialDatabase->new(
'-storable' => 'homologene_serialdatabase.storable' );
Creates a new instance of the SerialDatabase. Can be passed the name
of a file that contains a serialized SerialDatabase object.
next_record()
This method traverse all the records present in the Homologene
SerialDatabase. It returns next record untill it reaches the end of the
file. It returns undef if it encounters end of file.
rewind()
$hgo->rewind();
$record = $hgo->next_record;
This method is used to reset the internal pointer used to implement
the next_record() method. The pointer is reset so that
next_record() will return the first Homologene record.
find_first_record()
Iterates through the entire hash of records to find the id of the
first record and stores it away for future use by
the rewind() method.
add_record_object()
Takes a single argument which should be a Bio::Parser::Homologene::Record
object that will be added to the internal array of records according to
its id.
record()
my $record = $sdb->record( '47' );
Returns the Bio::Parser::Homologene::Record object that has the ID number
passed in. Undef is returned if no such object exists in the
SerialDatabase.
record_count()
This method returns a count of the number of record objects currently
stored in the SerialDatabase.
object_info()
Object Type Bio::Parser::Homologene::SerialDatabase
Creation time Fri Jul 29 15:34:38 2005
Creator module version 1.8
BioParser version 0.92
Record count xxxx
Every Bio::Parser object that is storable must also implement this
method. It should return a block of text that identifies the object
by listing key attributes. The block of text above shows the output
from calling object_info() on a
Bio::Parser::Homologene::SerialDatabase object.
$Id: SerialDatabase.pm,v 1.3 2007/08/16 06:41:18 jpearson Exp $
BioParser is copyright 2005 by The Translational Genomics Research
Institute. All rights reserved. This License is limited to, and you
may use the Software solely for, your own internal and non-commercial
use for academic and research purposes. Without limiting the foregoing,
you may not use the Software as part of, or in any way in connection
with the production, marketing, sale or support of any commercial
product or service or for any governmental purposes. For commercial or
governmental use, please contact licensing@tgen.org. By installing this
Software you are agreeing to the terms of the LICENSE file distributed
with this software.
In any work or product derived from the use of this Software, proper
attribution of the authors as the source of the software or data must be
made. The following URL should be cited:
http://bioinformatics.tgen.org/software/bioparser/
|