microbiomedata / metaMS

GC-MS Based Metabolomics Workflow
BSD 2-Clause "Simplified" License
4 stars 0 forks source link

Harmonize GC and LC spectral library creation and interfacing with MetabRef #45

Closed kheal closed 2 months ago

kheal commented 3 months ago

@smcolby has added corems.molecular_id.search.database_interfaces module to branch of lcmsrefactor (feature branch is metabrefapi.

Below is example code to work with GCMS workflow:

from corems.molecular_id.search.database_interfaces import MetabRefDatabaseInterface

# Initialize
metabref = MetabRefDatabaseInterface()

# Set token
# This isn't tied to the class, so as long as it's been set
# at some point and part of your environment, good to go.
metabref.set_token("metabref.token")

# Get some stuff
db = metabref.get_gcms_library(format='json')

The existing lipidomics workflow should access metabref using as much overlapping functionality as possible.

kheal commented 3 months ago

In review here: https://code.emsl.pnl.gov/mass-spectrometry/corems/-/merge_requests/86