line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Sandy::Command::Expression; |
2
|
|
|
|
|
|
|
# ABSTRACT: expression command class. Manage expression-matrix database. |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
638
|
use App::Sandy::Base 'class'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
593
|
use App::Sandy::DB::Handle::Expression; |
|
1
|
|
|
|
|
390
|
|
|
1
|
|
|
|
|
52
|
|
6
|
1
|
|
|
1
|
|
767
|
use Text::ASCIITable; |
|
1
|
|
|
|
|
7857
|
|
|
1
|
|
|
|
|
456
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'App::Sandy::CLI::Command'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.25'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'db' => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'App::Sandy::DB::Handle::Expression', |
15
|
|
|
|
|
|
|
builder => '_build_db', |
16
|
|
|
|
|
|
|
lazy_build => 1, |
17
|
|
|
|
|
|
|
handles => [qw/insertdb restoredb deletedb make_report retrievedb/] |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _build_db { |
21
|
0
|
|
|
0
|
|
|
return App::Sandy::DB::Handle::Expression->new; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
override 'opt_spec' => sub { |
25
|
|
|
|
|
|
|
super |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub subcommand_map { |
29
|
0
|
|
|
0
|
0
|
|
add => 'App::Sandy::Command::Expression::Add', |
30
|
|
|
|
|
|
|
remove => 'App::Sandy::Command::Expression::Remove', |
31
|
|
|
|
|
|
|
restore => 'App::Sandy::Command::Expression::Restore', |
32
|
|
|
|
|
|
|
dump => 'App::Sandy::Command::Expression::Dump' |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub validate_args { |
36
|
0
|
|
|
0
|
1
|
|
my ($self, $args) = @_; |
37
|
0
|
0
|
|
|
|
|
die "Too many arguments: '@$args'\n" if @$args; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub execute { |
41
|
0
|
|
|
0
|
1
|
|
my ($self, $opts, $args) = @_; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
my $report_ref = $self->make_report; |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
if (%$report_ref) { |
46
|
0
|
|
|
|
|
|
my $t1 = Text::ASCIITable->new; |
47
|
0
|
|
|
|
|
|
$t1->setCols('expression-matrix', 'source', 'provider', 'date'); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
for my $expression_matrix (sort keys %$report_ref) { |
50
|
0
|
|
|
|
|
|
my $attr = $report_ref->{$expression_matrix}; |
51
|
0
|
|
|
|
|
|
$t1->addRow($expression_matrix, $attr->{source}, $attr->{provider}, $attr->{date}); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
print $t1; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=encoding UTF-8 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
App::Sandy::Command::Expression - expression command class. Manage expression-matrix database. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
version 0.25 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SYNOPSIS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sandy expression |
75
|
|
|
|
|
|
|
sandy expression [options] |
76
|
|
|
|
|
|
|
sandy expression <command> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Options: |
79
|
|
|
|
|
|
|
-h, --help brief help message |
80
|
|
|
|
|
|
|
-H, --man full documentation |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Commands: |
83
|
|
|
|
|
|
|
add add a new expression-matrix to database |
84
|
|
|
|
|
|
|
dump dump an expression-matrix from database |
85
|
|
|
|
|
|
|
remove remove an user expression-matrix from database |
86
|
|
|
|
|
|
|
restore restore the database |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DESCRIPTION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Manage expression-matrix database. Running this command without any |
91
|
|
|
|
|
|
|
option or command will show all available matrices in the database. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 AUTHORS |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=over 4 |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Thiago L. A. Miller <tmiller@mochsl.org.br> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
J. Leonel Buzzo <lbuzzo@mochsl.org.br> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Felipe R. C. dos Santos <fsantos@mochsl.org.br> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Helena B. Conceição <hconceicao@mochsl.org.br> |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item * |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Gabriela Guardia <gguardia@mochsl.org.br> |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item * |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Fernanda Orpinelli <forpinelli@mochsl.org.br> |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item * |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Rafael Mercuri <rmercuri@mochsl.org.br> |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item * |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Rodrigo Barreiro <rbarreiro@mochsl.org.br> |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=item * |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Pedro A. F. Galante <pgalante@mochsl.org.br> |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=back |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
This software is Copyright (c) 2023 by Teaching and Research Institute from Sírio-Libanês Hospital. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
This is free software, licensed under: |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
The GNU General Public License, Version 3, June 2007 |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |