| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package HPC::Runner::Command; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
972655
|
use MooseX::App qw(Color); |
|
|
2
|
|
|
|
|
1829432
|
|
|
|
2
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
with 'BioSAILs::Utils::Plugin'; |
|
6
|
|
|
|
|
|
|
with 'BioSAILs::Utils::LoadConfigs'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
2682960
|
use MooseX::Types::Path::Tiny qw/Path Paths AbsPath AbsFile/; |
|
|
2
|
|
|
|
|
985233
|
|
|
|
2
|
|
|
|
|
31
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
option '+config_base' => ( default => '.hpcrunner', ); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head3 project |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
When submitting jobs we will prepend the jobname with the project name |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
option 'project' => ( |
|
19
|
|
|
|
|
|
|
is => 'rw', |
|
20
|
|
|
|
|
|
|
isa => 'Str', |
|
21
|
|
|
|
|
|
|
documentation => 'Give your jobnames an additional project name. ' |
|
22
|
|
|
|
|
|
|
. '#HPC jobname=gzip will be submitted as 001_project_gzip', |
|
23
|
|
|
|
|
|
|
required => 0, |
|
24
|
|
|
|
|
|
|
predicate => 'has_project', |
|
25
|
|
|
|
|
|
|
cmd_aliases => ['p'], |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
option 'no_log_json' => ( |
|
29
|
|
|
|
|
|
|
traits => ['Bool'], |
|
30
|
|
|
|
|
|
|
is => 'rw', |
|
31
|
|
|
|
|
|
|
isa => 'Bool', |
|
32
|
|
|
|
|
|
|
default => 0, |
|
33
|
|
|
|
|
|
|
documentation => 'Opt out of writing the tar archive of JSON stats. ' |
|
34
|
|
|
|
|
|
|
. 'This may be desirable for especially large workflows.', |
|
35
|
|
|
|
|
|
|
); |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has 'submission_uuid' => ( |
|
38
|
|
|
|
|
|
|
is => 'rw', |
|
39
|
|
|
|
|
|
|
isa => 'Str', |
|
40
|
|
|
|
|
|
|
required => 0, |
|
41
|
|
|
|
|
|
|
predicate => 'has_submissions_uuid', |
|
42
|
|
|
|
|
|
|
); |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
our $VERSION = '3.2.10'; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
app_strict 0; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub BUILD { } |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding utf-8 |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=begin HTML |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
<p><img |
|
57
|
|
|
|
|
|
|
src="http://github.com/jerowe/HPC-Runner-Command/blob/master/_docs/images/rabbit.jpeg" |
|
58
|
|
|
|
|
|
|
width="500" height="250" alt="HPC::Runner::Command" /></p> |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=end HTML |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
HPC::Runner::Command - Create composable bioinformatics hpc analyses. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
To create a new project |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
hpcrunner.pl new MyNewProject |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
To submit jobs to a cluster |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
hpcrunner.pl submit_jobs --infile my_submission.sh |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
To run jobs on an interactive queue or workstation |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
hpcrunner.pl single_node --infile my_submission.sh |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
HPC::Runner::Command is a set of libraries for scaffolding data analysis projects, |
|
81
|
|
|
|
|
|
|
submitting and executing jobs on an HPC cluster or workstation, and obsessively |
|
82
|
|
|
|
|
|
|
logging results. |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Get help by heading on over to github and raising an issue. L<GitHub | |
|
85
|
|
|
|
|
|
|
https://github.com/biosails/HPC-Runner-Command/issues>. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Please see the complete documentation at L<HPC::Runner::Command GitBooks | |
|
88
|
|
|
|
|
|
|
https://jerowe.gitbooks.io/hpc-runner-command-docs/content/>. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 Quick Start - Create a New Project |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
You can create a new project, with a sane directory structure by using |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
hpcrunner.pl new MyNewProject |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 Quick Start - Submit Workflows |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 Simple Example |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Our simplest example is a single job type with no dependencies - each task is |
|
101
|
|
|
|
|
|
|
independent of all other tasks. |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head3 Workflow file |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
#preprocess.sh |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
echo "preprocess" && sleep 10; |
|
108
|
|
|
|
|
|
|
echo "preprocess" && sleep 10; |
|
109
|
|
|
|
|
|
|
echo "preprocess" && sleep 10; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head3 Submit to the scheduler |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
hpcrunner.pl submit_jobs --infile preprocess.sh |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head3 Look at results! |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
tree hpc-runner |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head3 Audit your results |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
hpcrunner.pl stats -h |
|
122
|
|
|
|
|
|
|
hpcrunner.pl stats |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 Job Type Dependencency Declaration |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Most of the time we have jobs that depend upon other jobs. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head3 Workflow file |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
#blastx.sh |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
#HPC jobname=unzip |
|
133
|
|
|
|
|
|
|
unzip Sample1.zip |
|
134
|
|
|
|
|
|
|
unzip Sample2.zip |
|
135
|
|
|
|
|
|
|
unzip Sample3.zip |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
#HPC jobname=blastx |
|
138
|
|
|
|
|
|
|
#HPC deps=unzip |
|
139
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample1.fasta |
|
140
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample2.fasta |
|
141
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample3.fasta |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head3 Submit to the scheduler |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
hpcrunner.pl submit_jobs --infile preprocess.sh |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head3 Look at results! |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
tree hpc-runner |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 Task Dependencency Declaration |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Within a job type we can declare dependencies on particular tasks. |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head3 Workflow file |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
#blastx.sh |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
#HPC jobname=unzip |
|
160
|
|
|
|
|
|
|
#TASK tags=Sample1 |
|
161
|
|
|
|
|
|
|
unzip Sample1.zip |
|
162
|
|
|
|
|
|
|
#TASK tags=Sample2 |
|
163
|
|
|
|
|
|
|
unzip Sample2.zip |
|
164
|
|
|
|
|
|
|
#TASK tags=Sample3 |
|
165
|
|
|
|
|
|
|
unzip Sample3.zip |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
#HPC jobname=blastx |
|
168
|
|
|
|
|
|
|
#HPC deps=unzip |
|
169
|
|
|
|
|
|
|
#TASK tags=Sample1 |
|
170
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample1.fasta |
|
171
|
|
|
|
|
|
|
#TASK tags=Sample2 |
|
172
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample2.fasta |
|
173
|
|
|
|
|
|
|
#TASK tags=Sample3 |
|
174
|
|
|
|
|
|
|
blastx --db env_nr --sample Sample3.fasta |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head3 Submit to the scheduler |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
hpcrunner.pl submit_jobs --infile preprocess.sh |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head3 Look at results! |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
tree hpc-runner |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head3 Audit your results |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
hpcrunner.pl stats -h |
|
187
|
|
|
|
|
|
|
hpcrunner.pl stats |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 Declare Scheduler Variables |
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Each scheduler has its own set of variables. HPC::Runner::Command has a set of |
|
194
|
|
|
|
|
|
|
generalized variables for declaring types across templates. For more information |
|
195
|
|
|
|
|
|
|
please see L<Job Scheduler |
|
196
|
|
|
|
|
|
|
Comparison|https://jerowe.gitbooks.io/hpc-runner-command-docs/content/job_submission/comparison.html> |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
Additionally, for workflows with a large number of tasks, please see |
|
199
|
|
|
|
|
|
|
L<Considerations for Workflows with a Large Number of |
|
200
|
|
|
|
|
|
|
Tasks|https://jerowe.gitbooks.io/hpc-runner-command-docs/content/design_workflow.html#considerations-for-workflows-with-a-large-number-of-tasks> |
|
201
|
|
|
|
|
|
|
for information on how to group tasks together. |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head3 Workflow file |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
#blastx.sh |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
#HPC jobname=unzip |
|
208
|
|
|
|
|
|
|
#HPC cpus_per_task=1 |
|
209
|
|
|
|
|
|
|
#HPC partition=serial |
|
210
|
|
|
|
|
|
|
#HPC commands_per_node=1 |
|
211
|
|
|
|
|
|
|
#HPC mem=4GB |
|
212
|
|
|
|
|
|
|
#TASK tags=Sample1 |
|
213
|
|
|
|
|
|
|
unzip Sample1.zip |
|
214
|
|
|
|
|
|
|
#TASK tags=Sample2 |
|
215
|
|
|
|
|
|
|
unzip Sample2.zip |
|
216
|
|
|
|
|
|
|
#TASK tags=Sample3 |
|
217
|
|
|
|
|
|
|
unzip Sample3.zip |
|
218
|
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
#HPC jobname=blastx |
|
220
|
|
|
|
|
|
|
#HPC cpus_per_task=6 |
|
221
|
|
|
|
|
|
|
#HPC deps=unzip |
|
222
|
|
|
|
|
|
|
#TASK tags=Sample1 |
|
223
|
|
|
|
|
|
|
blastx --threads 6 --db env_nr --sample Sample1.fasta |
|
224
|
|
|
|
|
|
|
#TASK tags=Sample2 |
|
225
|
|
|
|
|
|
|
blastx --threads 6 --db env_nr --sample Sample2.fasta |
|
226
|
|
|
|
|
|
|
#TASK tags=Sample3 |
|
227
|
|
|
|
|
|
|
blastx --threads 6 --db env_nr --sample Sample3.fasta |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=head3 Submit to the scheduler |
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
hpcrunner.pl submit_jobs --infile preprocess.sh |
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=head3 Look at results! |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
tree hpc-runner |
|
236
|
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
=head3 Audit your results |
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
hpcrunner.pl stats -h |
|
240
|
|
|
|
|
|
|
hpcrunner.pl stats |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=cut |
|
243
|
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
1; |
|
247
|
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
__END__ |
|
249
|
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=head1 AUTHOR |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
Jillian Rowe E<lt>jillian.e.rowe@gmail.comE<gt> |
|
253
|
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=head1 Previous Release |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
This software was previously released under L<HPC::Runner>. |
|
257
|
|
|
|
|
|
|
L<HPC::Runner::Command> is a complete rewrite of the existing library. While it |
|
258
|
|
|
|
|
|
|
is meant to have much of the same functionality, it is not backwords compatible. |
|
259
|
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=head1 Acknowledgements |
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
As of Version 2.41: |
|
263
|
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
This modules continuing development is supported by NYU Abu Dhabi in the Center |
|
265
|
|
|
|
|
|
|
for Genomics and Systems Biology. With approval from NYUAD, this information was |
|
266
|
|
|
|
|
|
|
generalized and put on github, for which the authors would like to express |
|
267
|
|
|
|
|
|
|
their gratitude. |
|
268
|
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
Before Version 2.41 |
|
270
|
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
This module was originally developed at and for Weill Cornell Medical College in |
|
272
|
|
|
|
|
|
|
Qatar within ITS Advanced Computing Team. With approval from WCMC-Q, this |
|
273
|
|
|
|
|
|
|
information was generalized and put on github, for which the authors would like |
|
274
|
|
|
|
|
|
|
to express their gratitude. |
|
275
|
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
277
|
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
Copyright 2016- Jillian Rowe |
|
279
|
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
=head1 LICENSE |
|
281
|
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
283
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
=cut |