Skip to content

Commit 85fb3da

Browse files
committed
Merge branch 'wdl-1-2-directory' into 'master'
Add directory input handling for Bruker data file input to WDL See merge request mass-spectrometry/enviroms!14
2 parents f7b29d6 + d7185d6 commit 85fb3da

8 files changed

Lines changed: 163 additions & 3 deletions

.github/workflows/di_workflow_tests.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
run: |
3333
make docker-build-local
3434
35+
- name: Run Bruker di WDL with local Docker Image based on Dockerfile
36+
run: |
37+
miniwdl run wdl/di_fticr_ms_bruker.wdl -i wdl/di_fticr_wdl_input_local_docker_bruker.json --verbose --no-cache --copy-input-files
38+
39+
- name: Run Bruker di WDL with pushed Docker Image
40+
run: |
41+
make wdl-run-di-bruker
42+
3543
- name: Run di WDL with local Docker Image based on Dockerfile
3644
run: |
3745
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ wdl-run-di-local :
114114
@make docker-build-local
115115
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
116116

117+
wdl-run-di-bruker :
118+
119+
miniwdl run wdl/di_fticr_ms_bruker.wdl -i wdl/di_fticr_wdl_input_bruker.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_bruker.json --verbose --no-cache --copy-input-files
124+
117125
wdl-run-lc :
118126

119127
miniwdl run wdl/lc_fticr_ms.wdl -i wdl/lc_fticr_wdl_input.json --verbose --no-cache --copy-input-files

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 general 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.wdl

100755100644
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/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+
}

wdl/di_fticr_wdl_input_bruker.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
3+
"fticrmsNOM.runDirectInfusion.file_paths": [
4+
"data/raw_data/NEG_ESI_SRFA_Auto.d"
5+
],
6+
7+
"fticrmsNOM.runDirectInfusion.output_directory": "output",
8+
"fticrmsNOM.runDirectInfusion.output_type": "csv",
9+
"fticrmsNOM.runDirectInfusion.calibrate": true,
10+
"fticrmsNOM.runDirectInfusion.batch_calibrate": true,
11+
"fticrmsNOM.runDirectInfusion.calibration_ref_file_path": "./data/reference/SRFA.ref",
12+
13+
"fticrmsNOM.runDirectInfusion.corems_toml_path": "./configuration/di_corems.toml",
14+
15+
"fticrmsNOM.runDirectInfusion.polarity": "negative",
16+
"fticrmsNOM.runDirectInfusion.is_centroid": true,
17+
"fticrmsNOM.runDirectInfusion.raw_file_start_scan": 1,
18+
"fticrmsNOM.runDirectInfusion.raw_file_final_scan": 7,
19+
20+
"fticrmsNOM.runDirectInfusion.plot_mz_error": false,
21+
"fticrmsNOM.runDirectInfusion.plot_ms_assigned_unassigned": false,
22+
"fticrmsNOM.runDirectInfusion.plot_c_dbe": false,
23+
"fticrmsNOM.runDirectInfusion.plot_van_krevelen": false,
24+
"fticrmsNOM.runDirectInfusion.plot_ms_classes": false,
25+
"fticrmsNOM.runDirectInfusion.plot_mz_error_classes": false,
26+
"fticrmsNOM.runDirectInfusion.plot_qc": true
27+
28+
}
29+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"fticrmsNOM.docker_image": "local-enviroms:latest",
3+
4+
"fticrmsNOM.runDirectInfusion.file_paths": [
5+
"data/raw_data/NEG_ESI_SRFA_Auto.d"
6+
],
7+
8+
"fticrmsNOM.runDirectInfusion.output_directory": "output",
9+
"fticrmsNOM.runDirectInfusion.output_type": "csv",
10+
"fticrmsNOM.runDirectInfusion.calibrate": true,
11+
"fticrmsNOM.runDirectInfusion.batch_calibrate": true,
12+
"fticrmsNOM.runDirectInfusion.calibration_ref_file_path": "./data/reference/SRFA.ref",
13+
14+
"fticrmsNOM.runDirectInfusion.corems_toml_path": "./configuration/di_corems.toml",
15+
16+
"fticrmsNOM.runDirectInfusion.polarity": "negative",
17+
"fticrmsNOM.runDirectInfusion.is_centroid": true,
18+
"fticrmsNOM.runDirectInfusion.raw_file_start_scan": 1,
19+
"fticrmsNOM.runDirectInfusion.raw_file_final_scan": 7,
20+
21+
"fticrmsNOM.runDirectInfusion.plot_mz_error": false,
22+
"fticrmsNOM.runDirectInfusion.plot_ms_assigned_unassigned": false,
23+
"fticrmsNOM.runDirectInfusion.plot_c_dbe": false,
24+
"fticrmsNOM.runDirectInfusion.plot_van_krevelen": false,
25+
"fticrmsNOM.runDirectInfusion.plot_ms_classes": false,
26+
"fticrmsNOM.runDirectInfusion.plot_mz_error_classes": false,
27+
"fticrmsNOM.runDirectInfusion.plot_qc": true
28+
}

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)