File Coverage

blib/lib/Bio/KEGG.pm
Criterion Covered Total %
statement 6 26 23.0
branch n/a
condition n/a
subroutine 2 12 16.6
pod 10 10 100.0
total 18 48 37.5


line stmt bran cond sub pod time code
1             =head1 NAME
2            
3             Bio::KEGG - Perl module to fetch details parsed by Bio::KEGGI.
4            
5             =head1 SYNOPSIS
6            
7             my $keggi = Bio::KEGGI->new(
8             -file => 'keggfilename',
9             -type => 'ko',
10             );
11            
12             while (my $kegg = $keggi->next_rec) {
13             print $kegg->id;
14             }
15            
16             =head1 DESCRIPTION
17            
18             This module is used to fetch details from object created by Bio::KEGGI.
19             Create a new Bio::KEGG object is not supported.
20            
21             For more details for different input files, please refer to documents of
22             L, L, L and
23             L.
24            
25             =head1 AUTHOR
26            
27             Haizhou Liu, zeroliu-at-gmail-dot-com
28            
29             =head1 VERSION
30            
31             0.1.5
32            
33             =head1 METHODS
34            
35             =head2 id
36            
37             Name: id
38             Desc: Get KEGG entry id
39             Usage: $acc = $o_kegg->id()
40             Args:
41             Return: A string
42            
43             =head2 name
44            
45             Name: name
46             Desc: Get KEGG entry NAME.
47             Usage: $name = $o_kegg->name()
48             Args:
49             Return: A string
50            
51             =head2 desc
52            
53             Name: desc
54             Desc: Get KEGG entry DEFINITION information.
55             Usage: $desc = $o_kegg->desc()
56             Args:
57             Return: A string
58            
59             =head2 ec
60            
61             Name: ec
62             Desc: Get KEGG EC information.
63             Usage: $ra_ec = $o_kegg->ec()
64             Args:
65             Retuen: A reference to an array
66            
67             =head2 disease
68            
69             Name: disease
70             Desc: Get KEGG entry DISEASE information.
71            
72             $ra_disease = [ $disease_id, ... ];
73            
74             Usage: $rh_diseases = $o_kegg->disease()
75             Args:
76             Return: A reference to an array.
77            
78             =head2 pmid
79            
80             Name: pmid
81             Disc: Get KEGG entry PUBMED ids.
82            
83             $ra_pmid = [ $pmid, ... ];
84            
85             Usage: $o_kegg->pmids()
86             Args:
87             Return: A reference to an array.
88            
89             =head2 module
90            
91             Name: module
92             Disc: Get KEGG entry MODULE ids
93            
94             $ra_module = [ $module_id, ... ];
95            
96             Usage: $o_kegg->module()
97             Args:
98             Return: A reference to an array
99            
100             =head2 class
101            
102             Name: class
103             Disc: Get KEGG entry CLASS information
104            
105             $ra_class = [ $class, ... ];
106            
107             Usage: $o_kegg->class()
108             Args:
109             Return: A reference to an array
110            
111             =head2 pathway
112            
113             Name: pathway
114             Disc: Get KEGG entry PATHWAY ids
115            
116             $ra_pathways = [ pathway_id, ... ];
117            
118             Usage: $o_kegg->pathway()
119             Args:
120             Return: A reference to an array.
121            
122             =head2 dblink
123            
124             Name: dblink
125             Disc: Get KEGG entry DBLINKS information
126            
127             $rh_dblink = [
128             {
129             'db' => $db,
130             'entry' => [ entry, ... ],
131             },
132             ...
133             ];
134            
135             Usage: $o_kegg->dblink()
136             Args:
137             Return: A reference to a hash.
138            
139             =cut
140            
141             package Bio::KEGG;
142            
143 1     1   7 use strict;
  1         3  
  1         49  
144 1     1   6 use warnings;
  1         4  
  1         817  
145            
146             our $VERSION = "v0.1.5";
147            
148             =begin new
149             Name: new
150             Desc: Constructor for Bio::KEGG object
151             Usage:
152             Args:
153             Return: A KEGG object
154            
155             sub new {
156             my $class = shift;
157             warn "Sorry, construct $class object is not supported now.\n";
158            
159             return;
160             }
161            
162             =cut
163            
164             =begin id
165             Name: id
166             Desc: Get KEGG entry id
167             Usage: $acc = $o_kegg->id()
168             Args:
169             Return: A string
170             =cut
171            
172             sub id {
173 0     0 1   my $self = shift;
174            
175 0           return $self->{'id'};
176             }
177            
178             =begin name
179             Name: name
180             Desc: Get KEGG entry NAME.
181             Usage: $name = $o_kegg->name()
182             Args:
183             Return: A string
184             =cut
185            
186             sub name {
187 0     0 1   my $self = shift;
188            
189 0           return $self->{'name'};
190             }
191            
192             =begin desc
193             Name: desc
194             Desc: Get KEGG entry DEFINITION information.
195             Usage: $desc = $o_kegg->desc()
196             Args:
197             Return: A string
198             =cut
199            
200             sub desc {
201 0     0 1   my $self = shift;
202            
203 0           return $self->{'definit'};
204             }
205            
206             =begin ec
207             Name: ec
208             Desc: Get EC information
209             Usage: $o_kegg->ec()
210             Args:
211             Return: A reference to an array
212             =cut
213            
214             sub ec {
215 0     0 1   my $self = shift;
216            
217 0           return $self->{'ec'};
218             }
219            
220             =begin disease
221             Name: disease
222             Desc: Get KEGG entry DISEASE information.
223            
224             $ra_disease = [ $disease_id, ... ];
225            
226             Usage: $rh_diseases = $o_kegg->disease()
227             Args:
228             Return: A reference to an array.
229             =cut
230            
231             sub disease {
232 0     0 1   my $self = shift;
233            
234 0           return $self->{'disease'};
235             }
236            
237             =begin pmid
238             Name: pmid
239             Disc: Get KEGG entry PUBMED ids.
240            
241             $ra_pmid = [ $pmid, ... ];
242            
243             Usage: $o_kegg->pmids()
244             Args:
245             Return: A reference to an array.
246             =cut
247            
248             sub pmid {
249 0     0 1   my $self = shift;
250            
251 0           return $self->{'pmid'};
252             }
253            
254             =begin module
255             Name: module
256             Disc: Get KEGG entry MODULE ids
257            
258             $ra_module = [ $module_id, ... ];
259            
260             Usage: $o_kegg->module()
261             Args:
262             Return: A reference to an array
263             =cut
264            
265             sub module {
266 0     0 1   my $self = shift;
267            
268 0           return $self->{'module'};
269             }
270            
271             =begin class
272             Name: class
273             Disc: Get KEGG entry CLASS information
274            
275             $ra_class = [ $class, ... ];
276            
277             Usage: $o_kegg->class()
278             Args:
279             Return: A reference to an array
280             =cut
281            
282             sub class {
283 0     0 1   my $self = shift;
284            
285 0           return $self->{'class'};
286             }
287            
288             =begin pathway
289             Name: pathway
290             Disc: Get KEGG entry PATHWAY ids
291            
292             $ra_pathways = [ pathway_id, ... ];
293            
294             Usage: $o_kegg->pathway()
295             Args:
296             Return: A reference to an array.
297             =cut
298            
299             sub pathway {
300 0     0 1   my $self = shift;
301            
302 0           return $self->{'pathway'};
303             }
304            
305             =begin dblink
306             Name: dblink
307             Disc: Get KEGG entry DBLINKS information
308            
309             $rh_dblink = [
310             {
311             'db' => $db,
312             'entry' => [ entry, ... ],
313             },
314             ...
315             ];
316            
317             Usage: $o_kegg->dblink()
318             Args:
319             Return: A reference to a hash.
320             =cut
321            
322             sub dblink {
323 0     0 1   my $self = shift;
324            
325 0           return $self->{'dblink'};
326             }
327            
328             1;