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