Skip to content

Commit

Permalink
Add working placeholder for lipid pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kheal committed Nov 15, 2024
1 parent f0c6116 commit f26abc1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 55 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .


3 changes: 3 additions & 0 deletions metaMS/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions metaMS/lcms_lipidomics_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
corems>=2.0.0
corems==2.2.1
Click>=7.1.1
requests
nmdc-schema>=7.0.0
Expand Down
46 changes: 0 additions & 46 deletions wdl/metaMS_gcms.wdl

This file was deleted.

3 changes: 1 addition & 2 deletions wdl/metaMS_lipidomics.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ task runLipidomicsMetaMS {
docker: "local-metams:latest"
#TODO KRH: Change to dockerhub version after we've pushed the updated image
}
}

}
2 changes: 1 addition & 1 deletion wdl/metams_input_lipidomics.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"lcmsLipidomics.runLipidomicsMetaMS.config_file": "lipidomics_metams.toml"
"lcmsLipidomics.runLipidomicsMetaMS.config_file": "./configuration/lipidomics_metams.toml"
}

0 comments on commit f26abc1

Please sign in to comment.