| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HPC::Runner::Command::submit_jobs::Utils::Scheduler::Batch; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use Moose; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
8
|
|
|
4
|
1
|
|
|
1
|
|
7670
|
use Moose::Util::TypeConstraints; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#cmd_count = Int |
|
7
|
|
|
|
|
|
|
#job_deps = ArrayRef |
|
8
|
|
|
|
|
|
|
#batch_str = Str |
|
9
|
|
|
|
|
|
|
#job = Str |
|
10
|
|
|
|
|
|
|
#cmds = ArrayRef |
|
11
|
|
|
|
|
|
|
#batch_tags = ArrayRef |
|
12
|
|
|
|
|
|
|
#scheduler_index = Hashref[ArrayRef] |
|
13
|
|
|
|
|
|
|
#array_deps = ArrayRef <- Do I need this? |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#TODO batch_tags is going to be batch_tags and batch_dep_tags |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#Begin Example |
|
18
|
|
|
|
|
|
|
#my $href = { |
|
19
|
|
|
|
|
|
|
#'cmds' => [ |
|
20
|
|
|
|
|
|
|
#'#TASK tags=Sample1 |
|
21
|
|
|
|
|
|
|
##TASK deps=Sample1 |
|
22
|
|
|
|
|
|
|
#blastx -db env_nr -query Sample1 |
|
23
|
|
|
|
|
|
|
#' |
|
24
|
|
|
|
|
|
|
#], |
|
25
|
|
|
|
|
|
|
#'cmd_count' => '1', |
|
26
|
|
|
|
|
|
|
#'job_deps' => ['pyfasta'], |
|
27
|
|
|
|
|
|
|
#'batch_tags' => ['Sample1'], |
|
28
|
|
|
|
|
|
|
#'batch_str' => '#TASK tags=Sample1 |
|
29
|
|
|
|
|
|
|
##TASK deps=Sample1 |
|
30
|
|
|
|
|
|
|
#blastx -db env_nr -query Sample1 |
|
31
|
|
|
|
|
|
|
#', |
|
32
|
|
|
|
|
|
|
#'job' => 'blastx_scratch', |
|
33
|
|
|
|
|
|
|
#'scheduler_index' => { 'pyfasta' => ['0'], }, |
|
34
|
|
|
|
|
|
|
#'array_deps' => [ [ '1237_7', '1234_1' ], ], |
|
35
|
|
|
|
|
|
|
#}; |
|
36
|
|
|
|
|
|
|
#End Example |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has batch_tags => ( |
|
39
|
|
|
|
|
|
|
traits => ['Array'], |
|
40
|
|
|
|
|
|
|
is => 'rw', |
|
41
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
42
|
|
|
|
|
|
|
default => sub { [] }, |
|
43
|
|
|
|
|
|
|
handles => { |
|
44
|
|
|
|
|
|
|
all_batch_tags => 'elements', |
|
45
|
|
|
|
|
|
|
add_batch_tags => 'push', |
|
46
|
|
|
|
|
|
|
join_batch_tags => 'join', |
|
47
|
|
|
|
|
|
|
has_batch_tags => 'count', |
|
48
|
|
|
|
|
|
|
clear_batch_tags => 'clear', |
|
49
|
|
|
|
|
|
|
}, |
|
50
|
|
|
|
|
|
|
); |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
has 'cmd_count' => ( |
|
53
|
|
|
|
|
|
|
is => 'rw', |
|
54
|
|
|
|
|
|
|
required => 1, |
|
55
|
|
|
|
|
|
|
); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
has 'cmd_start' => ( |
|
58
|
|
|
|
|
|
|
is => 'rw', |
|
59
|
|
|
|
|
|
|
required => 1, |
|
60
|
|
|
|
|
|
|
); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
has 'job' => ( |
|
63
|
|
|
|
|
|
|
is => 'rw', |
|
64
|
|
|
|
|
|
|
isa => 'Str', |
|
65
|
|
|
|
|
|
|
required => 0, |
|
66
|
|
|
|
|
|
|
); |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
has 'scheduler_id' => ( |
|
69
|
|
|
|
|
|
|
is => 'rw', |
|
70
|
|
|
|
|
|
|
isa => 'Str', |
|
71
|
|
|
|
|
|
|
required => 0, |
|
72
|
|
|
|
|
|
|
); |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
has 'scheduler_index' => ( |
|
75
|
|
|
|
|
|
|
isa => 'HashRef', |
|
76
|
|
|
|
|
|
|
is => 'rw', |
|
77
|
|
|
|
|
|
|
default => sub { return {} }, |
|
78
|
|
|
|
|
|
|
documentation => |
|
79
|
|
|
|
|
|
|
q(Get the job dependency, and the index of the job scheduler id that corresponds to that batch), |
|
80
|
|
|
|
|
|
|
); |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |