Bio::D...y::list(3pm)
π NAME π
ok so bestie, welcome to Bio::DB::Taxonomy::list β it's an implementation of Bio::DB::Taxonomy that justβ¦ accepts lists of words and builds you a whole database out of them. iconic behavior honestly. β¨
πΈ SYNOPSIS πΈ
use Bio::DB::Taxonomy;
my $db = Bio::DB::Taxonomy->new( -source => 'list' );
my @ranks = ('superkingdom', 'class', 'genus', 'species');
my @names = ('Eukaryota', 'Mammalia', 'Homo', 'Homo sapiens');
$db->add_lineage(-names => \@names, -ranks => \@ranks);
@names = ('Eukaryota', 'Mammalia', 'Mus', 'Mus musculus');
$db->add_lineage(-names => \@names, -ranks => \@ranks);
π¦ DESCRIPTION π¦
So here's the vibe: this is an implementation that takes lists of words you hand it and uses them to create a database. Then you can pull Bio::Taxon objects right out of it. that's it, that's the whole thing. no cap. π
π TODO π
ngl, it's possible this module could do something like store the data it builds up to disc. would that be useful?? honestly who knows. π
anyway, this is exactly why the module is called list and not in_memory or something similar. the name is doing what it says on the tin. periodt.
π FEEDBACK π
π Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules β like, genuinely, your thoughts matter here. 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. There are so many experienced and responsive experts on there who 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 β the more deets the better, bestie.
π 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 - Sendu Bala π
Email 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::list->new();
- Function: Builds a new
Bio::DB::Taxonomy::listobject - Returns: an instance of
Bio::DB::Taxonomy::list - Args: optional, as per the
add_lineage()method.
π§ add_lineage
- Title:
add_lineage - Usage:
my @names = ('Eukaryota', 'Mammalia', 'Homo', 'Homo sapiens');
my @ranks = ('superkingdom', 'class', 'genus', 'species');
$db->add_lineage( -names => \@names, -ranks => \@ranks );
- Function: Add a lineage to the database, where the lineage is described by a list of scientific names in the order root->leaf. The rank of each name can optionally be described by supplying an additional list of rank names in the same order (eg. superkingdom->species).
- Returns:
1for success - Args:
-names => []: array ref of scientific names, REQUIRED-ranks => []: array ref of rank names, same order as above, OPTIONAL
π 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::Taxonobject from the database. - Returns:
Bio::Taxonobject - Args: A single value which is the ID of the taxon to retrieve OR named args, as follows:
-taxonid =>Taxonomy ID (NB: these are not NCBI taxonomy ids but 'list' pre-fixed ids unique to the list database).- OR
-name =>String (to query by a taxonomy name). A given taxon name can match different taxonomy objects. When that is the case, a warning is displayed and the first matching taxon is reported. Seeget_taxonids()to get all matching taxon IDs.- OR
-names =>Array ref of lineage names, like inadd_lineage(). To overcome the limitations of-name, you can use-namesto provide the full lineage of the taxon you want and get a unique, unambiguous taxon object.
π get_taxonids
- Title:
get_taxonids - Usage:
my @taxonids = $db->get_taxonids('Homo sapiens');
- Function: Searches for a taxonid (generated by the list module) 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
π 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::Taxonobjects - Args:
Bio::Taxon(that was retrieved from this database)
that's the whole page bestie, go build ur taxonomy database, u got this πβ¨π¦
perl v5.32.1 β 2021-08-15 β Bio::D...y::list(3pm) π
no cap, that's the version and date, love that for us π«Άπ
π¦ 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