1Bio::DB::Taxonomy::listU(s3e)r Contributed Perl DocumentaBtiioo:n:DB::Taxonomy::list(3)
2
3
4
6 Bio::DB::Taxonomy::list - An implementation of Bio::DB::Taxonomy that
7 accepts lists of words to build a database
8
10 use Bio::DB::Taxonomy;
11
12 my @names = ('Eukaryota', 'Mammalia', 'Homo', 'Homo sapiens');
13 my @ranks = qw(superkingdom class genus species);
14 my $db = Bio::DB::Taxonomy->new(-source => 'list', -names => \@names,
15 -ranks => \@ranks);
16
17 @names = ('Eukaryota', 'Mammalia', 'Mus', 'Mus musculus');
18 $db->add_lineage(-names => \@names, -ranks => \@ranks);
19
21 This is an implementation which uses supplied lists of words to create
22 a database from which you can extract Bio::Taxon objects.
23
25 It is possible this module could do something like store the data it
26 builds up to disc. Would that be useful? At any rate, this is why the
27 module is called 'list' and not 'in_memory' or similar.
28
30 Mailing Lists
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to the
33 Bioperl mailing list. Your participation is much appreciated.
34
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
37
38 Support
39 Please direct usage questions or support issues to the mailing list:
40
41 bioperl-l@bioperl.org
42
43 rather than to the module maintainer directly. Many experienced and
44 reponsive experts will be able look at the problem and quickly address
45 it. Please include a thorough description of the problem with code and
46 data examples if at all possible.
47
48 Reporting Bugs
49 Report bugs to the Bioperl bug tracking system to help us keep track of
50 the bugs and their resolution. Bug reports can be submitted via the
51 web:
52
53 http://bugzilla.open-bio.org/
54
56 Email bix@sendu.me.uk
57
59 The rest of the documentation details each of the object methods.
60 Internal methods are usually preceded with a _
61
62 new
63 Title : new
64 Usage : my $obj = Bio::DB::Taxonomy::list->new();
65 Function: Builds a new Bio::DB::Taxonomy::list object
66 Returns : an instance of Bio::DB::Taxonomy::list
67 Args : optional, as per the add_lineage() method.
68
69 add_lineage
70 Title : add_lineage
71 Usage : $db->add_lineage(-names => \@names)
72 Function: Add a lineage to the database, where the lineage is described by
73 a list of scientific names in the order root->leaf. The rank of each
74 name can optionally be described by supplying an additional list
75 of rank names in the same order (eg. superkingdom->species).
76 Returns : n/a
77 Args : -names => [] : array ref of scientific names, REQUIRED
78 -ranks => [] : array ref of rank names, same order as above, OPTIONAL
79
80 Bio::DB::Taxonomy Interface implementation
81 get_taxon
82 Title : get_taxon
83 Usage : my $taxon = $db->get_taxon(-taxonid => $taxonid)
84 Function: Get a Bio::Taxon object from the database.
85 Returns : Bio::Taxon object
86 Args : just a single value which is the database id, OR named args:
87 -taxonid => taxonomy id (to query by taxonid; NB: these are not
88 NCBI taxonomy ids but 'list' pre-fixed ids unique to the
89 list database)
90 OR
91 -name => string (to query by a taxonomy name)
92
93 get_taxonids
94 Title : get_taxonids
95 Usage : my @taxonids = $db->get_taxonids('Homo sapiens');
96 Function: Searches for a taxonid (generated by the list module) based on a
97 query string. Note that multiple taxonids can match to the same
98 supplied name.
99 Returns : array of integer ids in list context, one of these in scalar context
100 Args : string representing taxon's name
101
102 ancestor
103 Title : ancestor
104 Usage : my $ancestor_taxon = $db->ancestor($taxon)
105 Function: Retrieve the full ancestor taxon of a supplied Taxon from the
106 database.
107 Returns : Bio::Taxon
108 Args : Bio::Taxon (that was retrieved from this database)
109
110 each_Descendent
111 Title : each_Descendent
112 Usage : my @taxa = $db->each_Descendent($taxon);
113 Function: Get all the descendents of the supplied Taxon (but not their
114 descendents, ie. not a recursive fetchall).
115 Returns : Array of Bio::Taxon objects
116 Args : Bio::Taxon (that was retrieved from this database)
117
118
119
120perl v5.12.0 2010-04-29 Bio::DB::Taxonomy::list(3)