| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bio::GMOD::Query; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
31444
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
42
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use vars qw/@ISA/; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
47
|
|
|
5
|
1
|
|
|
1
|
|
1115
|
use LWP::UserAgent; |
|
|
1
|
|
|
|
|
53335
|
|
|
|
1
|
|
|
|
|
36
|
|
|
6
|
1
|
|
|
1
|
|
661
|
use Bio::GMOD; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
36
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use Bio::GMOD::Util::Rearrange; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
411
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
@ISA = qw/Bio::GMOD/; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Subclasses of Bio::GMOD::Query should implement the following methods. |
|
13
|
|
|
|
|
|
|
# See Bio::GMOD::Query::WormBase for an example. |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub fetch { |
|
16
|
0
|
|
|
0
|
0
|
|
my ($self,@p) = @_; |
|
17
|
0
|
|
|
|
|
|
my ($class,$name,@rest) = rearrange([qw/CLASS NAME/],@p); |
|
18
|
0
|
0
|
|
|
|
|
eval { "require $self"; } or die; |
|
|
0
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Class names correspond with method names |
|
21
|
0
|
|
|
|
|
|
$self->$class(-name=>$name,@rest); |
|
22
|
|
|
|
|
|
|
}; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# This is a generic database search |
|
26
|
|
|
|
|
|
|
sub search { |
|
27
|
0
|
|
|
0
|
0
|
|
my ($self,@p) = @_; |
|
28
|
0
|
|
|
|
|
|
my ($class,$name,@rest) = rearrange([qw/CLASS NAME/],@p); |
|
29
|
0
|
|
|
|
|
|
eval { "require $self"; }; |
|
|
0
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
$self->search(-name=>$name,@rest); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
###################################################### |
|
35
|
|
|
|
|
|
|
# The following methods should be provided in the |
|
36
|
|
|
|
|
|
|
# Query::Mod subclass |
|
37
|
|
|
|
|
|
|
###################################################### |
|
38
|
|
|
|
|
|
|
# Gene |
|
39
|
|
|
|
|
|
|
# Execute a query on the database for to fetch or search for |
|
40
|
|
|
|
|
|
|
# specific genes, returning a list of lists. Each list contains the |
|
41
|
|
|
|
|
|
|
# gene ID, its public name, and a brief functional description. |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Note that the behavior of the subroutine can be modified according |
|
44
|
|
|
|
|
|
|
# to whether this is a simple search or a fetch. You can determine the |
|
45
|
|
|
|
|
|
|
# type of action by examining the "search_type" parameter. |
|
46
|
|
|
|
|
|
|
sub gene { |
|
47
|
0
|
|
|
0
|
0
|
|
my ($self,@p) = @_; |
|
48
|
0
|
|
|
|
|
|
my ($query,$type) = rearrange([qw/query/],@p); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# Gene sequence |
|
52
|
|
|
|
|
|
|
# Provided with a Gene ID (or public_name), return the maximal extent |
|
53
|
|
|
|
|
|
|
# sequence of the gene |
|
54
|
|
|
|
|
|
|
sub gene_sequence { |
|
55
|
0
|
|
|
0
|
0
|
|
my ($self,@p) = @_; |
|
56
|
0
|
|
|
|
|
|
my ($id) = rearrange([qw/id/],@p); |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# Protein |
|
60
|
|
|
|
|
|
|
# Execute a query on the database for specific proteins |
|
61
|
0
|
|
|
0
|
0
|
|
sub protein { } |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# Protein sequence |
|
64
|
|
|
|
|
|
|
# Provided with a protein ID (or public_name), return the sequence of the protein |
|
65
|
|
|
|
|
|
|
sub protein_sequence { |
|
66
|
0
|
|
|
0
|
0
|
|
my ($self,@p) = @_; |
|
67
|
0
|
|
|
|
|
|
my ($id) = rearrange([qw/id/],@p); |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# mRNA |
|
71
|
0
|
|
|
0
|
0
|
|
sub mrna { } |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
# ncRNA |
|
74
|
0
|
|
|
0
|
0
|
|
sub ncrna { } |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
__END__ |