2.1 Find metabolites in the database¶
from marsi.io.db import Metabolite, Reference, Database
Looking for local setup.cfg
Not available [Errno 2] No such file or directory: 'setup.cfg'
/Users/joaca/Documents/repositories/marsi/marsi/chemistry/rdkit.py:25: DeprecationWarning: The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.
from rdkit.Chem import AllChem, MACCSkeys, MCS
len(Database.metabolites)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-c03391927b54> in <module>()
----> 1 len(Database.metabolites)
TypeError: 'result' object cannot be interpreted as an integer
Metabolites are indexed using InChI key.¶
For example: 1. 2-Deoxy-Glucose: PMMURAAUARKVCB-CERMHHMHSA-N-D 2. Norvaline: SNDPXSYFESPGGJ-SCSAIBSYSA-N
Metabolite.get('PMMURAAUARKVCB-CERMHHMHSA-N')
Formula | C6H12O5 |
InChi | InChI=1S/C6H12O5/c7-2-4-6(10)3(8)1-5(9)11-4/h3-10H,1-2H2/t3-,4-,5?,6+/m1/s1 |
InChi Key | PMMURAAUARKVCB-CERMHHMHSA-N |
Structure | |
DBs | drugbank: DB08831 |
Synonyms | 2-Deoxy-D-arabino-hexose |
Metabolite.get('SNDPXSYFESPGGJ-SCSAIBSYSA-N')
Formula | C5H11NO2 |
InChi | InChI=1S/C5H11NO2/c1-2-3-4(6)5(7)8/h4H,2-3,6H2,1H3,(H,7,8)/t4-/m1/s1 |
InChi Key | SNDPXSYFESPGGJ-SCSAIBSYSA-N |
Structure |
|
DBs | zinc: ZINC00391822 |
Synonyms |
The query can also be done using identifiers from databases¶
References are not indexed so this can be very slow.
ref = Reference.get(accession="ZINC00391822", database="zinc")
ref.id
3004454
mets = Metabolite.from_references(references=[ref])
mets[0]
Formula | C5H11NO2 |
InChi | InChI=1S/C5H11NO2/c1-2-3-4(6)5(7)8/h4H,2-3,6H2,1H3,(H,7,8)/t4-/m1/s1 |
InChi Key | SNDPXSYFESPGGJ-SCSAIBSYSA-N |
Structure |
|
DBs | zinc: ZINC00391822 |
Synonyms |