[bug 2714]
[bioperl-live.git] / Bio / Taxonomy / FactoryI.pm
blobaffdb66a62cd83a2518e5486443ec1753cccfbe8
3 # BioPerl interface of Bio::Taxnomoy::FactoryI
5 # Cared for by Juguang Xiao
7 # You may distribute this module under the same terms as Perl itself
9 # POD documentation - main does before the code
11 =head1 NAME
13 Bio::Taxonomy::FactoryI - interface to define how to access NCBI Taxonoy
15 =head1 DESCRIPTION
17 NB: This module has been deprecated.
19 $factory-E<gt>fetch is a general method to fetch Taxonomy by either NCBI
20 taxid or any types of names.
22 $factory-E<gt>fetch_parent($taxonomy), returns a Taxonomy that is
23 one-step higher rank of the taxonomy specified as argument.
25 $factory-E<gt>fetch_children($taxonomy), reports an array of Taxonomy
26 those are one-step lower rank of the taxonomy specified as the
27 argument.
29 =head1 AUTHOR - Juguang Xiao
31 juguang@tll.org.sg
33 =head1 CONTRIBUTORS
35 Additional contributors' names and emails here
37 =head1 APPENDIX
39 The rest of the documentation details each of the object methods.
40 Internal methods are usually preceded with a _
42 =cut
44 package Bio::Taxonomy::FactoryI;
45 use strict;
48 use base qw(Bio::Root::Root);
50 =head2 fetch
52 Title: fetch
53 Usage: my $taxonomy = $factory->fetch(-taxon_id => 9605);
54 my $taxonomy = $factory->fetch(-common_name => 'mammals');
55 Fuctnion: Fetch taxonomy by taxon_id, common name or scientific name.
56 Returns: an instance of Bio::Taxonomy
57 Args: -taxon_id => NCBI taxonomy ID
58 -common_name => comon name, such as 'human', 'mammals'
59 -scientifc_name => specitic name, such as 'sapiens', 'Mammalia'
61 =cut
63 sub fetch {
64 shift->throw_not_implemented;
67 =head2 fuzzy_fetch
69 Title: fuzzy_fetch
70 Usage: my @taxonomy = $factory->fuzzy_fetch(-name => 'mouse');
71 Function: Fuzzy fetch by name, or any text information found in DB
72 Returns: an array reference of Bio::Taxonomy objects
73 Args: -name => any name, such as common name, variant, scientific name
74 -description, or -desc => any text information
76 =cut
78 sub fuzzy_fetch {
79 shift->throw_not_implemented;
82 =head2 fetch_parent
84 Title: fetch_parent
85 Usage: my $parent_taxonomy = $factory->fetch_parent($taxonomy);
86 Function: Fetch the parent that is one-rank higher than the argument.
87 Returns: an instance of Bio::Taxonomy, or undef if the arg is the top one.
88 Args: a Bio::Taxonomy object.
90 =cut
92 sub fetch_parent {
93 shift->throw_not_implemented;
96 =head2 fetch_children
98 Title: fetch_children
99 Usage: my @children_taxonomy = $factory->fetch_children($taxonomy);
100 Function: Fetch all children those are one-rank lower than the argument.
101 Returns: an array reference of Bio::Taxonomy objects
102 Args: a Bio::Taxonomy object.
104 =cut
106 sub fetch_children {
107 shift->throw_not_implemented;