diff --git a/Dockerfile b/Dockerfile index c1b6c21..1315b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,14 @@ WORKDIR /metams COPY metaMS/ /metams/metaMS/ COPY README.md disclaimer.txt Makefile requirements.txt setup.py /metams/ COPY db/ /metams/db/ -RUN pip3 install --editable . +# Install the specific version of corems +RUN pip3 install corems==2.2.1 + +# Install other dependencies from requirements.txt +RUN pip3 install -r requirements.txt + +# Install the MetaMS package in editable mode +RUN pip3 install --editable . diff --git a/metaMS/cli.py b/metaMS/cli.py index 2610733..7d41b3a 100644 --- a/metaMS/cli.py +++ b/metaMS/cli.py @@ -198,3 +198,6 @@ def run_lipidomics_workflow(paramaters_file, directory, output_directory, token_ directory=directory, output_directory=output_directory, cores=cores ) click.echo("Running lipidomics workflow") + # test call: + # MetaMS run-lipidomics-workflow -p configuration/lipidomics_metams.toml + # miniwdl run wdl/metaMS_lipidomics.wdl -i wdl/metams_input_lipidomics.json diff --git a/metaMS/lcms_lipidomics_workflow.py b/metaMS/lcms_lipidomics_workflow.py index 12ed00a..323738b 100644 --- a/metaMS/lcms_lipidomics_workflow.py +++ b/metaMS/lcms_lipidomics_workflow.py @@ -4,8 +4,8 @@ import datetime from multiprocessing import Pool -from corems.mass_spectra.input.mzml import MZMLSpectraParser -from corems.mass_spectra.input.rawFileReader import ImportMassSpectraThermoMSFileReader +#from corems.mass_spectra.input.mzml import MZMLSpectraParser +#from corems.mass_spectra.input.rawFileReader import ImportMassSpectraThermoMSFileReader @dataclass class LipidomicsWorkflowParameters: @@ -58,10 +58,12 @@ def instantiate_lcms_obj(file_in): #parser = ImportMassSpectraThermoMSFileReader(file_in) if ".mzML" in str(file_in): - parser = MZMLSpectraParser(file_in) + #parser = MZMLSpectraParser(file_in) + pass # Instantiate lc-ms data object using parser and pull in ms1 spectra into dataframe (without storing as MassSpectrum objects to save memory) - myLCMSobj = parser.get_lcms_obj(spectra="ms1") + #myLCMSobj = parser.get_lcms_obj(spectra="ms1") + myLCMSobj = None return myLCMSobj @@ -129,5 +131,6 @@ def run_lcms_lipidomics_workflow( mz_dicts = pool.starmap(run_lipid_sp_ms1, args) pool.close() pool.join() + print("Finished processing all files") # TODO KRH: Add full lipidomics workflow here diff --git a/requirements.txt b/requirements.txt index c02842b..2eb2860 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -corems>=2.0.0 +corems==2.2.1 Click>=7.1.1 requests nmdc-schema>=7.0.0 diff --git a/wdl/metaMS_gcms.wdl b/wdl/metaMS_gcms.wdl deleted file mode 100644 index 2c812f9..0000000 --- a/wdl/metaMS_gcms.wdl +++ /dev/null @@ -1,46 +0,0 @@ -version 1.0 - -workflow gcmsMetabolomics { - call runMetaMSGCMS - - output { - String out = runMetaMSGCMS.out - File output_file = runMetaMSGCMS.output_file - File output_metafile = runMetaMSGCMS.output_metafile - } -} - -task runMetaMSGCMS { - input { - Array[File] file_paths - File calibration_file_path - String output_directory - String output_filename - String output_type - File corems_toml_path - File nmdc_metadata_path - Int jobs_count - } - - command { - metaMS run-gcms-wdl-workflow \ - ${sep=',' file_paths} \ - ${calibration_file_path} \ - ${output_directory} \ - ${output_filename} \ - ${output_type} \ - ${corems_toml_path} \ - ${nmdc_metadata_path} \ - --jobs ${jobs_count} - } - - output { - String out = read_string(stdout()) - File output_file = "${output_directory}/${output_filename}.${output_type}" - File output_metafile = "${output_directory}/${output_filename}.json" - } - - runtime { - docker: "microbiomedata/metams:2.2.2" - } -} \ No newline at end of file diff --git a/wdl/metaMS_lipidomics.wdl b/wdl/metaMS_lipidomics.wdl index 296ef23..dea4d11 100644 --- a/wdl/metaMS_lipidomics.wdl +++ b/wdl/metaMS_lipidomics.wdl @@ -17,5 +17,4 @@ task runLipidomicsMetaMS { docker: "local-metams:latest" #TODO KRH: Change to dockerhub version after we've pushed the updated image } -} - +} \ No newline at end of file diff --git a/wdl/metams_input_lipidomics.json b/wdl/metams_input_lipidomics.json index e113869..056f702 100644 --- a/wdl/metams_input_lipidomics.json +++ b/wdl/metams_input_lipidomics.json @@ -1,3 +1,3 @@ { - "lcmsLipidomics.runLipidomicsMetaMS.config_file": "lipidomics_metams.toml" + "lcmsLipidomics.runLipidomicsMetaMS.config_file": "./configuration/lipidomics_metams.toml" } \ No newline at end of file