line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Workflow::Command::run; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
401927
|
use v5.10; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
257
|
use MooseX::App::Command; |
|
1
|
|
|
|
|
1908
|
|
|
1
|
|
|
|
|
3
|
|
5
|
1
|
|
|
1
|
|
88718
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
77
|
use File::Path qw(make_path); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'BioX::Workflow::Command'; |
10
|
1
|
|
|
1
|
|
431
|
use BioSAILs::Utils::Traits qw(ArrayRefOfStrs); |
|
1
|
|
|
|
|
21459
|
|
|
1
|
|
|
|
|
6
|
|
11
|
1
|
|
|
1
|
|
1183
|
use BioX::Workflow::Command::run::Rules::Directives; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Utils::Samples'; |
14
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Utils::Attributes'; |
15
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Rules::Rules'; |
16
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Utils::WriteMeta'; |
17
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Utils::Files::TrackChanges'; |
18
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::run::Utils::Files::ResolveDeps'; |
19
|
|
|
|
|
|
|
with 'BioX::Workflow::Command::Utils::Files'; |
20
|
|
|
|
|
|
|
with 'BioSAILs::Utils::Files::CacheDir'; |
21
|
|
|
|
|
|
|
with 'BioSAILs::Utils::CacheUtils'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
command_short_description 'Run your workflow.'; |
24
|
|
|
|
|
|
|
command_long_description |
25
|
|
|
|
|
|
|
'Run your workflow, process the variables, and create all your directories.'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 BioX::Workflow::Command::run |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
biox run -h |
30
|
|
|
|
|
|
|
biox run -w variant_calling.yml |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 Attributes |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 Subroutines |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub execute { |
43
|
|
|
|
|
|
|
my $self = shift; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
if ( !$self->load_yaml_workflow ) { |
46
|
|
|
|
|
|
|
$self->app_log->warn('Exiting now.'); |
47
|
|
|
|
|
|
|
return; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$self->print_opts; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
$self->app_log->info("Your cached workflow is available at\n\t".$self->cached_workflow."\n"); |
53
|
|
|
|
|
|
|
$self->apply_global_attributes; |
54
|
|
|
|
|
|
|
$self->get_global_keys; |
55
|
|
|
|
|
|
|
$self->get_samples; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$self->write_workflow_meta('start'); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$self->iterate_rules; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
before 'BUILD' => sub { |
64
|
|
|
|
|
|
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
make_path( $self->cache_dir ); |
67
|
|
|
|
|
|
|
make_path( File::Spec->catdir( $self->cache_dir, '.biox-cache', 'logs' ) ); |
68
|
|
|
|
|
|
|
make_path( File::Spec->catdir( $self->cache_dir, '.biox-cache', 'workflows' ) ); |
69
|
|
|
|
|
|
|
}; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |