Bio::D...latfile(3pm)
π NAME π
Bio::DB::Taxonomy::flatfile β bestie, this is the one that reads your NCBI taxonomy straight off local indexed flat files β¨
πΈ SYNOPSIS πΈ
use Bio::DB::Taxonomy;
my $db = Bio::DB::Taxonomy->new(-source => 'flatfile' ,
-nodesfile => 'nodes.dmp',
-namesfile => 'names.dmp');
π¦ DESCRIPTION π¦
okay so this is an implementation of Bio::DB::Taxonomy that stores and accesses the NCBI taxonomy using flat files stored locally on disk, and it indexes them with the DB_File module's RECNO data structure so retrieval is fast fast fast π
the database files you need β nodes.dmp and names.dmp β can be obtained from:
ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
go get 'em bestie π«Ά
π¬ FEEDBACK π¬
π Mailing Lists
user feedback is like, an integral part of the evolution of this and other Bioperl modules, fr fr. 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
π Support
please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. many experienced and reponsive experts will be able look at the problem and quickly address it. please include a thorough description of the problem with code and data examples if at all possible. (yes the original says "reponsive", we are not touching it, it's iconic π)
π 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:
https://github.com/bioperl/bioperl-live/issues
π 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 = Bio::DB::Taxonomy::flatfile->new();
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 to replace current indexes even if they exist
π Bio::DB::Taxonomy interface implementation
π₯ get_num_taxa
Title : get_num_taxa
Usage : my $num = $db->get_num_taxa();
Function: Get the number of taxa stored in the database.
Returns : A number
Args : None
β 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
heads up: multiple taxonids can match to the same supplied name β that's just how it is π
π 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())
deprecated alert!! this one is deprecated, use each_Descendent() instead bestie π
π 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)
note: this gives you the descendents but not their descendents β it is not a recursive fetchall, okay?? π
β¨ Helper methods
π index_directory
Title : index_directory
Function : 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)
perl v5.32.1 Β· 2021-08-15 β that's the version and the date this page was born, bestie π and it's the User Contributed Perl Documentation for Bio::D...latfile(3pm), so yeah, go read your taxonomy files and slay ππβ¨
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms