Skip to content

Commit f7b29d6

Browse files
committed
Merge branch 'di_workflow_bjm' into 'master'
DI FTICR workflow improvements and version bump See merge request mass-spectrometry/enviroms!12
2 parents 82f9b48 + 6158c63 commit f7b29d6

29 files changed

Lines changed: 539 additions & 1005 deletions

.bumpversion.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.0.0
2+
current_version = 5.1.0
33
commit = False
44
tag = False
55

@@ -21,5 +21,3 @@ values =
2121
[bumpversion:file:wdl/lc_fticr_ms.wdl]
2222

2323
[bumpversion:file:wdl/di_fticr_ms.wdl]
24-
25-
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test DI Workflow
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
run-miniwdl:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.8'
19+
20+
- name: Install Docker
21+
run: |
22+
curl -fsSL https://get.docker.com -o get-docker.sh
23+
sh get-docker.sh
24+
sudo usermod -aG docker $USER
25+
26+
- name: Install MiniWDL
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install miniwdl
30+
31+
- name: Build Docker Image
32+
run: |
33+
make docker-build-local
34+
35+
- name: Run di WDL with local Docker Image based on Dockerfile
36+
run: |
37+
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
38+
39+
- name: Run di WDL with pushed Docker Image
40+
run: |
41+
make wdl-run-di

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,12 @@ share/python-wheels/
3939
*.egg
4040

4141
# Raw data files
42-
*.raw
42+
*.raw
43+
*.d
44+
data/raw_data/example_data/
45+
46+
# Processed data
47+
output
48+
49+
# Generated molecular formula database
50+
db/molformulas.sqlite

.gitlab-ci.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## enviroMS Contributing Guidelines
2+
3+
A work in progress.
4+
5+
#### Steps to create a new version
6+
7+
1. Protect feature branch.
8+
2. Set up Github mirroring (work with Yuri).
9+
3. The next push to feature branch will trigger Github Actions to run on that branch. Ensure those checks are passing.
10+
4. Bump enviroMS version using Makefile command (see semantic versioning guidelines).
11+
5. Merge feature branch into main on Gitlab.
12+
6. Use Github Actions to manually push the new Docker image to Dockerhub.
13+
7. Ensure Github checks now pass on main, using the latest Dockerhub image.
14+
8. Create a new release tag on Github.

Makefile

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
app_name = enviroms
22
parameters_path = data/enviroms.toml
33
# change the path to your data path /Users/eber373/Desenvolvimento/enviroms
4-
data_dir = /Users/eber373/Development/enviroms/data
5-
configuration_dir = /Users/eber373/Development/enviroms/configuration
4+
data_dir = /home/bmeluch/enviroMS_work/example_data
5+
configuration_dir = /home/bmeluch/enviroMS_work/enviroms/configuration
66
version := $(shell cat .bumpversion.cfg | grep current_version | cut -d= -f2 | tr -d ' ')
77
stage := $(shell cat .bumpversion.cfg | grep optional_value | cut -d= -f2 | tr -d ' ')
88

@@ -72,14 +72,26 @@ docker-build:
7272

7373
docker-build-local:
7474

75-
docker build -t local-enviroms:$(version) .
76-
75+
docker build --pull --no-cache -t local-enviroms:latest .
7776

7877
docker-run-di:
7978

8079
@echo $(data_dir)
8180
@echo $(configuration_dir)
82-
docker run -v $(data_dir):/enviroms/data -v $(configuration_dir):/enviroms/configuration microbiomedata/enviroms:$(version) run-di /enviroms/configuration/enviroms.toml
81+
docker run -v $(data_dir):/enviroms/data -v $(configuration_dir):/enviroms/configuration microbiomedata/enviroms:$(version) run_di /enviroms/configuration/di_enviroms.toml
82+
83+
docker-run-di-local:
84+
85+
@make docker-build-local
86+
@echo $(data_dir)
87+
@echo $(configuration_dir)
88+
docker run \
89+
-v $(data_dir):/enviroms/data/raw_data \
90+
-v ./data/output:/enviroms/data/output \
91+
-v ./data/reference:/enviroms/data/reference \
92+
-v $(configuration_dir):/enviroms/configuration \
93+
local-enviroms:latest \
94+
enviroMS run_di /enviroms/configuration/di_enviroms.toml
8395

8496
docker-run-lc:
8597

@@ -91,14 +103,25 @@ cascade-run:
91103

92104
srun -A mscms -t 240 -N 1 -n time enviroMS run-di -r 2 --mpi /dtemp/mscms/enviroms/data/configuration/enviroms.toml
93105

106+
cli-run-di :
107+
enviroMS run_di configuration/di_enviroms.toml --jobs 1 --replicas 1 --tasks 1
108+
94109
wdl-run-di :
95110

96111
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
97112

113+
wdl-run-di-local :
114+
@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
116+
98117
wdl-run-lc :
99118

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

121+
wdl-run-lc-local:
122+
123+
miniwdl run wdl/lc_fticr_ms.wdl -i wdl/lc_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
124+
102125
get-lcms-fticr-test-data:
103126

104127
@echo "Downloading test files for LC-MS FT-ICR workflow"
@@ -132,6 +155,4 @@ get-lcms-fticr-test-data:
132155
else echo "Reference file exists"; fi
133156
@echo "LC-MS FT-ICR test files complete"
134157

135-
wdl-run-lc-local:
136158

137-
miniwdl run wdl/lc_fticr_ms.wdl -i wdl/lc_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## Current Version
2222

23-
### `5.0.0`
23+
### `5.1.0`
2424

2525
### Data input formats
2626

@@ -199,7 +199,7 @@ A docker image containing the EnviroMS command line as code entry-point
199199
- Run Workflow from Container:
200200
201201
$(data_dir) = dir_containing the FT-ICR MS data
202-
$(configuration_dir) = dir_containing the enviroms.toml, corems.toml and nmdc_metadata.json
202+
$(configuration_dir) = dir_containing the enviroms.toml and corems.toml
203203
204204
```bash
205205
docker run -v $(data_dir):/enviroms/data \

configuration/di_corems.toml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ isotopologue_filter_atoms = [ "Cl", "Br",]
55
use_runtime_kendrick_filter = false
66
use_min_peaks_filter = true
77
min_peaks_per_class = 15
8-
url_database = "sqlite:///db/molformulas.db"
8+
url_database = ""
99
db_jobs = 3
1010
db_chunk_size = 300
1111
ion_charge = -1
@@ -29,8 +29,8 @@ isRadical = false
2929
isProtonated = true
3030
isAdduct = false
3131
ionization_type = "ESI"
32-
min_ppm_error = -10.0
33-
max_ppm_error = 10.0
32+
min_ppm_error = -10
33+
max_ppm_error = 10
3434
min_abun_error = -100.0
3535
max_abun_error = 100.0
3636
mz_error_range = 1.5
@@ -62,8 +62,8 @@ max_picking_mz = 1200.0
6262
picking_point_extrapolate = 3
6363
calib_minimize_method = "Powell"
6464
calib_pol_order = 2
65-
max_calib_ppm_error = 1.0
66-
min_calib_ppm_error = -1.0
65+
max_calib_ppm_error = -1.0
66+
min_calib_ppm_error = 1.0
6767
calib_sn_threshold = 2.0
6868
calibration_ref_match_method = "legacy"
6969
calibration_ref_match_method_implemented = [ "legacy", "merged",]
@@ -77,14 +77,17 @@ implemented_kendrick_rounding_methods = [ "floor", "ceil", "round",]
7777
peak_derivative_threshold = 0.0
7878
peak_min_prominence_percent = 0.1
7979
min_peak_datapoints = 5.0
80-
peak_max_prominence_percent = 0.1
80+
peak_max_prominence_percent = 1
8181
peak_height_max_percent = 10.0
8282
legacy_resolving_power = true
8383
centroid_legacy_polyfit = false
8484

8585
[MolecularFormulaSearch.usedAtoms]
8686
C = [ 1, 100,]
87-
H = [ 1, 200,]
87+
H = [ 4, 200,]
88+
O = [ 0, 22,]
89+
N = [ 0, 1,]
90+
S = [ 0, 1,]
8891

8992
[MolecularFormulaSearch.used_atom_valences]
9093
C = 4

configuration/di_enviroms.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
raw_file_start_scan = 1
22
raw_file_final_scan = 7
3-
file_paths = [ "data/raw_data/20190709_WK_CADY_Auto_S16_H1_Post_O5_1_01_36.tsv" ]
4-
output_directory = "output"
3+
file_paths = "data/raw_data/*"
4+
output_directory = "data/output"
55
output_group_name = "..."
66
output_type = "csv"
77
polarity = -1
88
is_centroid = true
9-
corems_toml_path = "configuration/corems.toml"
10-
nmdc_metadata_path = "configuration/nmdc_metadata.json"
9+
corems_toml_path = "configuration/di_corems.toml"
1110
calibrate = true
12-
calibration_ref_file_path = "data/raw_data/SRFA.ref"
11+
batch_calibrate = true
12+
calibration_ref_file_path = "data/reference/Hawkes_neg.ref"
1313
plot_mz_error = true
1414
plot_ms_assigned_unassigned = true
1515
plot_c_dbe = true
1616
plot_van_krevelen = true
1717
plot_ms_classes = true
18-
plot_mz_error_classes = true
18+
plot_mz_error_classes = true
19+
plot_qc = true

0 commit comments

Comments
 (0)