File: FactoryI.pm

package info (click to toggle)
bioperl 1.7.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 49,564 kB
  • sloc: perl: 170,474; xml: 22,869; lisp: 2,034; sh: 1,990; makefile: 22
file content (112 lines) | stat: -rw-r--r-- 2,808 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#
#
# BioPerl interface of Bio::Taxnomoy::FactoryI
#
# Please direct questions and support issues to <bioperl-l@bioperl.org> 
#
# Cared for by Juguang Xiao
#
# You may distribute this module under the same terms as Perl itself
#
# POD documentation - main does before the code

=head1 NAME

Bio::Taxonomy::FactoryI - interface to define how to access NCBI Taxonoy

=head1 DESCRIPTION

NB: This module has been deprecated.

$factory-E<gt>fetch is a general method to fetch Taxonomy by either NCBI
taxid or any types of names.

$factory-E<gt>fetch_parent($taxonomy), returns a Taxonomy that is
one-step higher rank of the taxonomy specified as argument.

$factory-E<gt>fetch_children($taxonomy), reports an array of Taxonomy
those are one-step lower rank of the taxonomy specified as the
argument.

=head1 AUTHOR - Juguang Xiao

juguang@tll.org.sg

=head1 CONTRIBUTORS

Additional contributors' names and emails here

=head1 APPENDIX

The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _

=cut

package Bio::Taxonomy::FactoryI;
use strict;


use base qw(Bio::Root::Root);

=head2 fetch

  Title:    fetch
  Usage:    my $taxonomy = $factory->fetch(-taxon_id => 9605);
            my $taxonomy = $factory->fetch(-common_name => 'mammals');
  Fuctnion: Fetch taxonomy by taxon_id, common name or scientific name.
  Returns:  an instance of Bio::Taxonomy
  Args:     -taxon_id => NCBI taxonomy ID
            -common_name => comon name, such as 'human', 'mammals'
            -scientifc_name => specitic name, such as 'sapiens', 'Mammalia'

=cut

sub fetch {
    shift->throw_not_implemented;
}

=head2 fuzzy_fetch

  Title:    fuzzy_fetch
  Usage:    my @taxonomy = $factory->fuzzy_fetch(-name => 'mouse');
  Function: Fuzzy fetch by name, or any text information found in DB
  Returns:  an array reference of Bio::Taxonomy objects
  Args:     -name => any name, such as common name, variant, scientific name
            -description, or -desc => any text information

=cut

sub fuzzy_fetch {
    shift->throw_not_implemented;
}

=head2 fetch_parent

  Title:    fetch_parent
  Usage:    my $parent_taxonomy = $factory->fetch_parent($taxonomy);
  Function: Fetch the parent that is one-rank higher than the argument.
  Returns:  an instance of Bio::Taxonomy, or undef if the arg is the top one.
  Args:     a Bio::Taxonomy object.

=cut

sub fetch_parent {
    shift->throw_not_implemented;
}

=head2 fetch_children

  Title:    fetch_children
  Usage:    my @children_taxonomy = $factory->fetch_children($taxonomy);
  Function: Fetch all children those are one-rank lower than the argument.
  Returns:  an array reference of Bio::Taxonomy objects
  Args:     a Bio::Taxonomy object.

=cut

sub fetch_children {
    shift->throw_not_implemented;
}

1;