forked from HopkinsIDD/flepimop_sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modelWorkflow_bak.wdl
87 lines (73 loc) · 2.04 KB
/
modelWorkflow_bak.wdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version 1.0
task run_Model {
input {
File setup_os_script
File install_git_script
File clone_repository_script
File move_model_output_script
String model_git_repository
File install_model_script
File model_configuration_yml
String model_executable
File run_model_script
String model_output_folder
String model_runtime_docker
}
String model_output_files = "model_output_files.txt"
command {
${setup_os_script}
${install_git_script}
${clone_repository_script} "${model_git_repository}"
${install_model_script}
${run_model_script} "${model_executable}" "${model_configuration_yml}"
find ./"${model_output_folder}" -name '*.parquet' > "${model_output_files}"
}
runtime {
docker: "${model_runtime_docker}"
}
output {
Array[File] output_files = read_lines(model_output_files)
}
}
task moveResults {
input {
File move_results_script
File output_file
String runtime_docker
}
command {
${move_results_script} "${output_file}"
}
runtime {
docker: "${runtime_docker}"
}
output {
String out = read_string(stdout())
}
}
workflow modelWorkflow {
input {
File setup_os_script
File install_git_script
File clone_repository_script
File move_model_output_script
}
call run_Model {
input:
setup_os_script = setup_os_script,
install_git_script = install_git_script,
clone_repository_script = clone_repository_script,
move_model_output_script = move_model_output_script
}
Array[File] model_output_files = run_Model.output_files
scatter (outputFile in model_output_files) {
call moveResults {
input:
move_results_script = "./scripts/sh/move_results.sh",
output_file = outputFile
}
}
output {
Array[File] outputFiles = model_output_files
}
}