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 = new Bio::DB::Taxonomy(-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
32 User feedback is an integral part of the evolution of this and other
33 Bioperl modules. Send your comments and suggestions preferably to the
34 Bioperl mailing list. Your participation is much appreciated.
35
36 bioperl-l@bioperl.org - General discussion
37 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
38
39 Reporting Bugs
40
41 Report bugs to the Bioperl bug tracking system to help us keep track of
42 the bugs and their resolution. Bug reports can be submitted via the
43 web:
44
45 http://bugzilla.open-bio.org/
46
48 Email bix@sendu.me.uk
49
51 The rest of the documentation details each of the object methods.
52 Internal methods are usually preceded with a _
53
54 new
55
56 Title : new
57 Usage : my $obj = new Bio::DB::Taxonomy::list();
58 Function: Builds a new Bio::DB::Taxonomy::list object
59 Returns : an instance of Bio::DB::Taxonomy::list
60 Args : optional, as per the add_lineage() method.
61
62 add_lineage
63
64 Title : add_lineage
65 Usage : $db->add_lineage(-names => \@names)
66 Function: Add a lineage to the database, where the lineage is described by
67 a list of scientific names in the order root->leaf. The rank of each
68 name can optionally be described by supplying an additional list
69 of rank names in the same order (eg. superkingdom->species).
70 Returns : n/a
71 Args : -names => [] : array ref of scientific names, REQUIRED
72 -ranks => [] : array ref of rank names, same order as above, OPTIONAL
73
74 Bio::DB::Taxonomy Interface implementation
75
76 get_taxon
77
78 Title : get_taxon
79 Usage : my $taxon = $db->get_taxon(-taxonid => $taxonid)
80 Function: Get a Bio::Taxon object from the database.
81 Returns : Bio::Taxon object
82 Args : just a single value which is the database id, OR named args:
83 -taxonid => taxonomy id (to query by taxonid; NB: these are not
84 NCBI taxonomy ids but 'list' pre-fixed ids unique to the
85 list database)
86 OR
87 -name => string (to query by a taxonomy name)
88
89 get_taxonids
90
91 Title : get_taxonids
92 Usage : my @taxonids = $db->get_taxonids('Homo sapiens');
93 Function: Searches for a taxonid (generated by the list module) based on a
94 query string. Note that multiple taxonids can match to the same
95 supplied name.
96 Returns : array of integer ids in list context, one of these in scalar context
97 Args : string representing taxon's name
98
99 ancestor
100
101 Title : ancestor
102 Usage : my $ancestor_taxon = $db->ancestor($taxon)
103 Function: Retrieve the full ancestor taxon of a supplied Taxon from the
104 database.
105 Returns : Bio::Taxon
106 Args : Bio::Taxon (that was retrieved from this database)
107
108 each_Descendent
109
110 Title : each_Descendent
111 Usage : my @taxa = $db->each_Descendent($taxon);
112 Function: Get all the descendents of the supplied Taxon (but not their
113 descendents, ie. not a recursive fetchall).
114 Returns : Array of Bio::Taxon objects
115 Args : Bio::Taxon (that was retrieved from this database)
116
117 Helper methods
118
119perl v5.8.8 2007-05-07 Bio::DB::Taxonomy::list(3)