| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package PomBase::Chobo; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
PomBase::Chobo |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Read an OBO file and store in a Chado database |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SUPPORT |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
perldoc PomBase::Chobo |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
You can also look for information at: |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Copyright (C) 2013-2021 Kim Rutherford. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
27
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
|
28
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
our $VERSION = '0.038'; # VERSION |
|
35
|
|
|
|
|
|
|
|
|
36
|
1
|
|
|
1
|
|
713
|
use 5.020; |
|
|
1
|
|
|
|
|
4
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
1
|
|
|
1
|
|
11
|
use Mouse; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
12
|
|
|
39
|
1
|
|
|
1
|
|
1235
|
use Text::CSV; |
|
|
1
|
|
|
|
|
22170
|
|
|
|
1
|
|
|
|
|
53
|
|
|
40
|
|
|
|
|
|
|
|
|
41
|
1
|
|
|
1
|
|
606
|
use PomBase::Chobo::ParseOBO; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
35
|
|
|
42
|
1
|
|
|
1
|
|
515
|
use PomBase::Chobo::ChadoData; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
53
|
|
|
43
|
1
|
|
|
1
|
|
7
|
use PomBase::Chobo::OntologyData; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
168
|
|
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has dbh => (is => 'ro'); |
|
47
|
|
|
|
|
|
|
has ontology_data => (is => 'ro', required => 1); |
|
48
|
|
|
|
|
|
|
has parser => (is => 'ro', init_arg => undef, lazy_build => 1); |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
with 'PomBase::Chobo::Role::ChadoStore'; |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _build_parser |
|
53
|
|
|
|
|
|
|
{ |
|
54
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
|
55
|
|
|
|
|
|
|
|
|
56
|
2
|
|
|
|
|
24
|
return PomBase::Chobo::ParseOBO->new(); |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub read_obo |
|
60
|
|
|
|
|
|
|
{ |
|
61
|
2
|
|
|
2
|
0
|
6
|
my $self = shift; |
|
62
|
2
|
|
|
|
|
8
|
my %args = @_; |
|
63
|
|
|
|
|
|
|
|
|
64
|
2
|
|
|
|
|
4
|
my $filename = $args{filename}; |
|
65
|
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
10
|
my $ontology_data = $self->ontology_data(); |
|
67
|
2
|
|
|
|
|
16
|
my $parser = $self->parser(); |
|
68
|
|
|
|
|
|
|
|
|
69
|
2
|
|
|
|
|
45
|
$parser->parse(filename => $filename, ontology_data => $ontology_data); |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# sub chado_store() - from PomBase::Chobo::ChadoStore |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |