Comments (8)
Allow me to share my experience. Making up my own merged database (HMDB+MoNA+Nist+, ...) I used two variables: compound_id (primary key) and old_compound_id (primigenius id, for traceability reasons).
I use also that strategy for spectrum data structure, (spectrum_id (primary key) & old_spectra_id). Here spectrum_id allows me also to link every spectrum matrix (keep it as a list apart of matrices ) with its metadata spectra (a spectrum (metadata) dataframe)
from compounddb.
The reason I did not made compound_id
unique is that the compound identifiers from some databases are not unique.
Note however that synonym
does in fact already point to that column, i.e. the reference from synonym
to compound
is via compound_id
, also from msms_spectrum
we link to compound
via compound_id
.
I would not like to force primary/foreign key constraints to database columns to keep the design of the tables as simple as possible... but we can discuss on that obviously.
from compounddb.
OK. But if compound_id
is not unique how do you refer back to it in a unique way? One spectrum would then refer to several compounds?
Another way to do it would require/generate a unique ID, use that for reference, and then have another column with the external ID?
from compounddb.
What about the use case that somebody wants to generate a "superduper merged DB" from HMDB, ChEBI, KEGG etc. Then the compound_id
would be mixed as far as I got it. Is there the possibility to add IDs from different DBs as additional columns? I usually prefer the InChIKey as unique ID for metabolites (also not perfect, but the best that could be done so far). In my SQLite DBs for masstrixR I just have a running integer as unique ID within the DB.
from compounddb.
In the end, the compound_id
is supposed to be unique - I just did not put the SQL contraint on the column to force it to be unique or a primary key.
I also thought of using the InChiKey as primary identifier, but that does not work out, as even HMDB has several compounds with the same InChiKEy, but different compound ids.
If you want we can force the compound id to be unique in the compound
table, no problem with that.
from compounddb.
Thanks for the feedback @jmbadia ! And based on which identifier/information you merge compounds across databases? Is it the InChiKey?
from compounddb.
Yes, and it is something our group still talk about because we know we have under the same 'compound' different isomers (and it hurts). But at the end we have assumed a very pragmatic approach:
A) It is a information that we just can not have. The only way to differentiate among compounds in a DB would be considering "isomeric smiles" (not available usually) or "name" (very inconsistent) values. So actually it would be very difficult to know which isomer is every compound's DB
B) We assume that we are working with "a compound... and its isomers" . The user knows that the result of an identification is not referred to a compound but also to its isomers. We only trust its inchikey.
Obviously, we might as well not have merged compounds
from compounddb.
BTW we also merge spectra, but it is no so controversial. Same (relative) spectral matrix & same nuclear spectral metadata=> same spectra
from compounddb.
Related Issues (20)
- Create an IonDb with all theoretical adducts for a CompoundDb
- Function to combine/concatenate CompDb databases
- Add an insertCompound function HOT 1
- Availability of functions to create empty CompDB and insert and delete compounds HOT 2
- Seeking suggestions for database development (HMDB version 5) HOT 2
- Pass skipErrors to read.SDFset through compound_tbl_sdf? HOT 4
- Replace mass2mz and mz2mass with the ones from MetaboCoreUtils
- Rename table "compound" into "ms_compound"
- Implement a StandardsDb that extends CompoundDb HOT 11
- Update the MsBackendCompDb HOT 1
- insertIon method HOT 4
- non integer msLevel values HOT 3
- Add possibility to delete (inserted or existing) ions or MS/MS spectra
- Prepare for Bioconductor submission HOT 3
- Arbitrary columns in insertIon
- Transfer of CompoundDb
- Support import from MoNa MSP files HOT 1
- custom Db - spectra and ion Db questions HOT 2
- Issue with GitHub install of CompoundDb HOT 3
- mass2mz method for CompDb HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compounddb.