| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id: Species.pm,v 1.3 2005/06/29 18:40:19 sshu Exp $ |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# This GO module is maintained by Chris Mungall |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# see also - http://www.geneontology.org |
|
6
|
|
|
|
|
|
|
# - http://www.godatabase.org/dev |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package GO::Model::Species; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
GO::Model::Species; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
represents a gene product in a particular species (this will |
|
19
|
|
|
|
|
|
|
effectively always be refered to implicitly by the gene symbol even |
|
20
|
|
|
|
|
|
|
though a gene may have >1 product) |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
14
|
|
|
14
|
|
72
|
use Carp; |
|
|
14
|
|
|
|
|
25
|
|
|
|
14
|
|
|
|
|
825
|
|
|
26
|
14
|
|
|
14
|
|
78
|
use Exporter; |
|
|
14
|
|
|
|
|
29
|
|
|
|
14
|
|
|
|
|
477
|
|
|
27
|
14
|
|
|
14
|
|
75
|
use GO::Utils qw(rearrange); |
|
|
14
|
|
|
|
|
24
|
|
|
|
14
|
|
|
|
|
549
|
|
|
28
|
14
|
|
|
14
|
|
72
|
use GO::Model::Root; |
|
|
14
|
|
|
|
|
29
|
|
|
|
14
|
|
|
|
|
396
|
|
|
29
|
14
|
|
|
14
|
|
79
|
use strict; |
|
|
14
|
|
|
|
|
23
|
|
|
|
14
|
|
|
|
|
445
|
|
|
30
|
14
|
|
|
14
|
|
63
|
use vars qw(@ISA); |
|
|
14
|
|
|
|
|
25
|
|
|
|
14
|
|
|
|
|
4759
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
@ISA = qw(GO::Model::Root Exporter); |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _valid_params { |
|
35
|
152
|
|
|
152
|
|
526
|
return qw(id ncbi_taxa_id genus species common_name lineage_string apph); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub from_bpspecies { |
|
39
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
|
40
|
0
|
|
|
|
|
|
my $species = shift; |
|
41
|
0
|
|
|
|
|
|
my $division = shift; |
|
42
|
0
|
|
|
|
|
|
my $taxon = $class->new; |
|
43
|
0
|
|
|
|
|
|
$taxon->common_name($species->common_name); |
|
44
|
0
|
|
|
|
|
|
$taxon->genus($species->genus); |
|
45
|
0
|
|
|
|
|
|
$taxon->species($species->species); |
|
46
|
|
|
|
|
|
|
# $taxon->taxon_code($division) if $division; |
|
47
|
0
|
|
|
|
|
|
$taxon; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub binomial { |
|
51
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
52
|
0
|
|
0
|
|
|
|
return ($self->genus || "")." ".($self->species || ""); |
|
|
|
|
0
|
|
|
|
|
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|