Skip to content

Commit b5e9a17

Browse files
committed
add directory input handling
1 parent f7b29d6 commit b5e9a17

5 files changed

Lines changed: 102 additions & 7 deletions

File tree

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,21 @@ cascade-run:
106106
cli-run-di :
107107
enviroMS run_di configuration/di_enviroms.toml --jobs 1 --replicas 1 --tasks 1
108108

109-
wdl-run-di :
109+
wdl-run-di-thermo :
110110

111-
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
111+
miniwdl run wdl/di_fticr_ms_thermo.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
112112

113-
wdl-run-di-local :
113+
wdl-run-di-thermo-local :
114114
@make docker-build-local
115-
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
115+
miniwdl run wdl/di_fticr_ms_thermo.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
116+
117+
wdl-run-di-bruker :
118+
119+
miniwdl run wdl/di_fticr_ms_bruker.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
120+
121+
wdl-run-di-bruker-local :
122+
@make docker-build-local
123+
miniwdl run wdl/di_fticr_ms_bruker.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
116124

117125
wdl-run-lc :
118126

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ pip3 install miniwdl
165165
```
166166

167167
For Direct Infusion Workflow:
168+
169+
_Note that for the direct infusion workflow, the WDL file used depends on the instrument/output file type. Use "Bruker" WDL for .d files and "Thermo" WDL for ".raw" files._
170+
168171
```bash
169-
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
172+
miniwdl run wdl/di_fticr_ms_bruker.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
170173
```
171174
For Liquid Chromatography Workflow:
172175
```bash

wdl/di_fticr_ms_bruker.wdl

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
version 1.2
2+
3+
workflow fticrmsNOM {
4+
input {
5+
String? docker_image # Optional input for Docker image
6+
}
7+
8+
call runDirectInfusion {
9+
input:
10+
docker_image = docker_image
11+
}
12+
13+
output {
14+
String out = runDirectInfusion.out
15+
Array[File] output_files = runDirectInfusion.output_files
16+
Array[File] van_krevelen_plots = runDirectInfusion.van_krevelen_plots
17+
Array[File] dbe_vs_c_plots = runDirectInfusion.dbe_vs_c_plots
18+
Array[File] ms_class_plots = runDirectInfusion.ms_class_plots
19+
Array[File] mz_error_class_plots = runDirectInfusion.mz_error_class_plots
20+
Array[File] qc_plots = runDirectInfusion.qc_plots
21+
}
22+
}
23+
24+
task runDirectInfusion {
25+
input {
26+
Array[Directory] file_paths
27+
String output_directory
28+
String output_type
29+
File corems_toml_path
30+
String polarity
31+
Int raw_file_start_scan
32+
Int raw_file_final_scan
33+
Boolean is_centroid
34+
File calibration_ref_file_path
35+
Boolean calibrate
36+
Boolean batch_calibrate
37+
Boolean plot_mz_error
38+
Boolean plot_ms_assigned_unassigned
39+
Boolean plot_c_dbe
40+
Boolean plot_van_krevelen
41+
Boolean plot_ms_classes
42+
Boolean plot_mz_error_classes
43+
Boolean plot_qc
44+
Int jobs_count = 1
45+
String? docker_image
46+
}
47+
48+
command {
49+
enviroMS run_di_wdl \
50+
${sep=',' file_paths} \
51+
${output_directory} \
52+
${output_type} \
53+
${corems_toml_path} \
54+
${polarity} \
55+
${raw_file_start_scan} \
56+
${raw_file_final_scan} \
57+
${is_centroid} \
58+
${calibration_ref_file_path} \
59+
-c ${calibrate} \
60+
-bc ${batch_calibrate} \
61+
-e ${plot_mz_error} \
62+
-a ${plot_ms_assigned_unassigned} \
63+
-cb ${plot_c_dbe} \
64+
-vk ${plot_van_krevelen} \
65+
-mc ${plot_ms_classes} \
66+
-ec ${plot_mz_error_classes} \
67+
-qc ${plot_qc} \
68+
--jobs ${jobs_count}
69+
}
70+
71+
output {
72+
String out = read_string(stdout())
73+
Array[File] output_files = glob('${output_directory}/**/*.*')
74+
Array[File] van_krevelen_plots = glob('${output_directory}/**/van_krevelen/*.*')
75+
Array[File] dbe_vs_c_plots = glob('${output_directory}/**/dbe_vs_c/*.*')
76+
Array[File] ms_class_plots = glob('${output_directory}/**/ms_class/*.*')
77+
Array[File] mz_error_class_plots = glob('${output_directory}/**/mz_error_class/*.*')
78+
Array[File] qc_plots = glob('${output_directory}/**/qc_plots/*.*')
79+
}
80+
81+
runtime {
82+
docker: "~{if defined(docker_image) then docker_image else 'microbiomedata/enviroms:5.1.0'}"
83+
}
84+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version 1.0
1+
version 1.2
22

33
workflow fticrmsNOM {
44
input {

wdl/lc_fticr_ms.wdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version 1.0
1+
version 1.2
22

33
workflow lc_ft_icr_ms {
44
input {

0 commit comments

Comments
 (0)