| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package BioX::Workflow::Command::add; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1140
|
use v5.10; |
|
|
1
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use MooseX::App::Command; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
6
|
1
|
|
|
1
|
|
11007
|
use namespace::autoclean; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
73
|
use YAML; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
270
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'BioX::Workflow::Command'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::Utils::Create'; |
|
13
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::Utils::Files'; |
|
14
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::Utils::Log'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
command_short_description 'Add rules to an existing workflow.'; |
|
17
|
|
|
|
|
|
|
command_long_description 'Add rules to an existing workflow.'; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 BioX::Workflow::Command::add |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
This is the main class of the `biox-workflow.pl add` command. |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 Command Line Options |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=cut |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
option '+outfile' => ( |
|
30
|
|
|
|
|
|
|
default => sub { |
|
31
|
|
|
|
|
|
|
my $self = shift; |
|
32
|
|
|
|
|
|
|
my $workflow = $self->workflow; |
|
33
|
|
|
|
|
|
|
return "$workflow"; |
|
34
|
|
|
|
|
|
|
}, |
|
35
|
|
|
|
|
|
|
documentation => 'Write your workflow to a file. The default will write it out to the same workflow.', |
|
36
|
|
|
|
|
|
|
); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub execute { |
|
39
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
40
|
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if(! $self->load_yaml_workflow){ |
|
42
|
0
|
|
|
|
|
|
$self->app_log->warn('Exiting now.'); |
|
43
|
0
|
|
|
|
|
|
return; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
$self->app_log->info('Adding rules: '.join(', ', $self->all_rules)); |
|
47
|
0
|
|
|
|
|
|
my $rules = $self->add_rules; |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
map { push(@{$self->workflow_data->{rules}}, $_ ) } @{$rules}; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
$self->fh->print(Dump($self->workflow_data)); |
|
52
|
0
|
|
|
|
|
|
$self->fh->close; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |