rformassspectrometry / CompoundDb

Creating and using (chemical) compound databases
https://rformassspectrometry.github.io/CompoundDb/index.html
17 stars 16 forks source link

Add new spectra to an `CompDb` database #61

Closed jorainer closed 2 years ago

jorainer commented 4 years ago

This is related to issue https://github.com/rformassspectrometry/Spectra/issues/135 . Would be nice to have an expandable database, e.g. pre-fill with MS2 spectra from a public repository and then (sequentially) add own spectra and annotations to it.

Maybe best to add functions

addSpectra <- function(x, spectra)
updateSpectra <- function(x, spectra)
removeSpectra <- function(x, spectra)

Where x is a CompDb and spectra a Spectra object. Note that the spectra also need to have a reference to the compound in the compound table - which might have to be added before.

michaelwitting commented 4 years ago

A short question from my side: I have developed the MassBank backend, Steffen the Msp backend and maybe somebody else some other... Shall at least the three/four/five of us agree on some common variable names, e.g. for InChIKey, SMILES, ID or so? Like this at least we don't have to map all the time between different preferences of variable naming. And maybe define a minimal set?