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.039'; # VERSION |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
1
|
|
585
|
use 5.020; |
|
1
|
|
|
|
|
4
|
|
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
1
|
|
6
|
use Mouse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
39
|
1
|
|
|
1
|
|
1203
|
use Text::CSV; |
|
1
|
|
|
|
|
23524
|
|
|
1
|
|
|
|
|
60
|
|
40
|
|
|
|
|
|
|
|
41
|
1
|
|
|
1
|
|
494
|
use PomBase::Chobo::ParseOBO; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
42
|
1
|
|
|
1
|
|
521
|
use PomBase::Chobo::ChadoData; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
39
|
|
43
|
1
|
|
|
1
|
|
11
|
use PomBase::Chobo::OntologyData; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
266
|
|
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
|
|
|
|
|
66
|
return PomBase::Chobo::ParseOBO->new(); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub read_obo |
60
|
|
|
|
|
|
|
{ |
61
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
62
|
2
|
|
|
|
|
7
|
my %args = @_; |
63
|
|
|
|
|
|
|
|
64
|
2
|
|
|
|
|
6
|
my $filename = $args{filename}; |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
7
|
my $ontology_data = $self->ontology_data(); |
67
|
2
|
|
|
|
|
15
|
my $parser = $self->parser(); |
68
|
|
|
|
|
|
|
|
69
|
2
|
|
|
|
|
50
|
$parser->parse(filename => $filename, ontology_data => $ontology_data); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# sub chado_store() - from PomBase::Chobo::ChadoStore |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
1; |