NAME
Bio::DB::Taxonomy::flatfile - An implementation of Bio::DB::Taxonomy which uses local flat files
SYNOPSIS
use Bio::DB::Taxonomy;
my $db = new Bio::DB::Taxonomy(-source => 'flatfile'
-nodesfile => $nodesfile,
-namesfile => $namefile);
DESCRIPTION
This is an implementation which uses local flat files and the DB_File module RECNO data structures to manage a local copy of the NCBI Taxonomy database.
Required database files can be obtained from ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
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 the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
http://bugzilla.open-bio.org/
AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
CONTRIBUTORS
Sendu Bala: bix@sendu.me.uk
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : new
Usage : my $obj = new Bio::DB::Taxonomy::flatfile();
Function: Builds a new Bio::DB::Taxonomy::flatfile object
Returns : an instance of Bio::DB::Taxonomy::flatfile
Args : -directory => name of directory where index files should be created
-nodesfile => name of file containing nodes (nodes.dmp from NCBI)
-namesfile => name of the file containing names(names.dmp from NCBI)
-force => 1 replace current indexes even if they exist
Bio::DB::Taxonomy Interface implementation
get_taxon
Title : get_taxon
Usage : my $taxon = $db->get_taxon(-taxonid => $taxonid)
Function: Get a Bio::Taxon object from the database.
Returns : Bio::Taxon object
Args : just a single value which is the database id, OR named args:
-taxonid => taxonomy id (to query by taxonid)
OR
-name => string (to query by a taxonomy name: common name,
scientific name, etc)
get_taxonids
Title : get_taxonids
Usage : my @taxonids = $db->get_taxonids('Homo sapiens');
Function: Searches for a taxonid (typically ncbi_taxon_id) based on a query
string. Note that multiple taxonids can match to the same supplied
name.
Returns : array of integer ids in list context, one of these in scalar context
Args : string representing taxon's name
get_Children_Taxids
Title : get_Children_Taxids
Usage : my @childrenids = $db->get_Children_Taxids
Function: Get the ids of the children of a node in the taxonomy
Returns : Array of Ids
Args : Bio::Taxon or a taxon_id
Status : deprecated (use each_Descendent())
ancestor
Title : ancestor
Usage : my $ancestor_taxon = $db->ancestor($taxon)
Function: Retrieve the full ancestor taxon of a supplied Taxon from the
database.
Returns : Bio::Taxon
Args : Bio::Taxon (that was retrieved from this database)
each_Descendent
Title : each_Descendent
Usage : my @taxa = $db->each_Descendent($taxon);
Function: Get all the descendents of the supplied Taxon (but not their
descendents, ie. not a recursive fetchall).
Returns : Array of Bio::Taxon objects
Args : Bio::Taxon (that was retrieved from this database)
Helper methods
index_directory
Title : index_directory
Funtion : Get/set the location that index files are stored. (this module
will index the supplied database)
Usage : $obj->index_directory($newval)
Returns : value of index_directory (a scalar)
Args : on set, new value (a scalar or undef, optional)