NAME
Bio::DB::Taxonomy::entrez - Taxonomy Entrez driver
SYNOPSIS
# Do not use this object directly, rather through the Bio::DB::Taxonomy # interface
use Bio::DB::Taxonomy;my $db = Bio::DB::Taxonomy->new(-source => 'entrez');my $taxonid = $db->get_taxonid('Homo sapiens');my $node = $db->get_Taxonomy_Node(-taxonid => $taxonid);my $gi = 71836523;my $node = $db->get_Taxonomy_Node(-gi => $gi, -db => 'protein');print $node->binomial, "\n";my ($species,$genus,$family) = $node->classification;print "family is $family\n";# Can also go up 4 levelsmy $p = $node;for ( 1..4 ) {$p = $db->get_Taxonomy_Node(-taxonid => $p->parent_id);}print $p->rank, " ", ($p->classification)[0], "\n";# could then classify a set of BLAST hits based on their GI numbers# into taxonomic categories.
It is not currently possibly to query a node for its children so we cannot completely replace the advantage of the flatfile Bio::DB::Taxonomy::flatfile module.
DESCRIPTION
A driver for querying NCBI Entrez Taxonomy database.
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
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.
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.org
CONTRIBUTORS
Sendu Bala: [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $obj = Bio::DB::Taxonomy::entrez->new();Function: Builds a new Bio::DB::Taxonomy::entrez objectReturns : an instance of Bio::DB::Taxonomy::entrezArgs : -location => URL to Entrez (if you want to override the default)-params => Hashref of URL params if you want to override thedefault
get_num_taxa
Title : get_num_taxaUsage : my $num = $db->get_num_taxa();Function: Get the number of taxa stored in the database.Returns : A numberArgs : None
get_taxon
Title : get_taxonUsage : my $taxon = $db->get_taxon(-taxonid => $taxonid)Function: Get a Bio::Taxon object from the database.Returns : Bio::Taxon objectArgs : 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)ORTo retrieve a taxonomy node for a GI number provide the -gi optionwith the gi number and -db with either 'nucleotide' or 'protein' todefine the db.AND optionally,-full => 1 (to force retrieval of full information - sometimesminimal information about your taxon may have beencached, which is normally used to save databaseaccesses)
get_taxonids
Title : get_taxonidsUsage : my $taxonid = $db->get_taxonids('Homo sapiens');Function: Searches for a taxonid (typically ncbi_taxon_id) based on a querystring. Note that multiple taxonids can match to the same suppliedname.Returns : array of integer ids in list context, one of these in scalar contextArgs : string representing taxon's name
ancestor
Title : ancestorUsage : my $ancestor_taxon = $db->ancestor($taxon)Function: Retrieve the ancestor taxon of a supplied Taxon from the database.Note that unless the ancestor has previously been directlyrequested with get_taxon(), the returned Taxon object will only havea minimal amount of information.Returns : Bio::TaxonArgs : Bio::Taxon (that was retrieved from this database)
each_Descendent
Title : each_DescendentUsage : my @taxa = $db->each_Descendent($taxon);Function: Get all the descendents of the supplied Taxon (but not theirdescendents, ie. not a recursive fetchall).Note that this implementation is unable to return a taxon thathasn't previously been directly fetched with get_taxon(), or wasn'tan ancestor of such a fetch.Returns : Array of Bio::Taxon objectsArgs : Bio::Taxon (that was retrieved from this database)
Some Get/Setter methods
entrez_url
Title : entrez_urlUsage : $obj->entrez_url($newval)Function: Get/set entrez URLReturns : value of entrez url (a scalar)Args : on set, new value (a scalar or undef, optional)
entrez_params
Title : entrez_paramsUsage : $obj->entrez_params($newval)Function: Get/set entrez paramsReturns : value of entrez_params (a hashref)Args : on set, new value Hashref
Bio::DB::WebBase methods
proxy_string
Title : proxy_stringUsage : my $proxy_string = $self->proxy_string($protocol)Function: Get the proxy string (plus user/pass )Returns : stringArgs : protocol ('http' or 'ftp'), default 'http'
proxy
Title : proxyUsage : $httpproxy = $db->proxy('http') or$db->proxy(['http','ftp'], 'http://myproxy' )Function: Get/Set a proxy for use of proxyReturns : a string indicating the proxyArgs : $protocol : an array ref of the protocol(s) to set/get$proxyurl : url of the proxy to use for the specified protocol$username : username (if proxy requires authentication)$password : password (if proxy requires authentication)
authentication
Title : authenticationUsage : $db->authentication($user,$pass)Function: Get/Set authentication credentialsReturns : Array of user/passArgs : Array or user/pass