In [1]:
from marsi.nearest_neighbors import search_closest_compounds


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.

In [2]:
from marsi.chemistry.common import dynamic_fingerprint_cut

In [3]:
glucose_inchi = "InChI=1/C6H12O6/c7-1-2-3(8)4(9)5(10)6(11)12-2/h2-11H,1H2/t2-,3-,4+,5-,6+/m1/s1"

In [4]:
from marsi.chemistry.molecule import Molecule

In [5]:
glucose_molecule = Molecule.from_inchi(glucose_inchi)

In [6]:
glucose_molecule


Out[6]:
- Open Babel Depiction HO HO HO OH OH O

In [7]:
cutoff = dynamic_fingerprint_cut(glucose_molecule.num_atoms); cutoff


Out[7]:
0.439615

In [8]:
hits = search_closest_compounds(molecule=glucose_molecule, fp_cut=cutoff)


/usr/local/miniconda3/envs/marsi/lib/python3.5/site-packages/sklearn/utils/validation.py:475 DataConversionWarning: Data with input dtype int32 was converted to bool by check_pairwise_arrays.
/Users/joaca/Documents/repositories/marsi/marsi/chemistry/rdkit.py:258 DeprecationWarning: The rdkit.Chem.MCS module is deprecated; please use rdkit.Chem.rdFMCS instead.

In [9]:
hits.sort_values('structural_score', ascending=False).head(15)


Out[9]:
formula atoms bonds tanimoto_similarity structural_score
BQCCAEOLPYCBAE-UKFBFLRUSA-N C6H13NO5 25 25 0.777778 0.96
MSWZFWKMSRAUBD-RDQKPOQOSA-N C6H13NO5 25 25 0.777778 0.96
MSWZFWKMSRAUBD-UKFBFLRUSA-N C6H13NO5 25 25 0.777778 0.96
WCWOEQFAYSXBRK-GKFJPSPNSA-N C6H13NO5 25 25 0.692308 0.96
WCWOEQFAYSXBRK-FPRJBGLDSA-N C6H13NO5 25 25 0.692308 0.96
WCWOEQFAYSXBRK-FQJSGBEDSA-N C6H13NO5 25 25 0.692308 0.96
MSWZFWKMSRAUBD-FQJSGBEDSA-N C6H13NO5 25 25 0.777778 0.96
WCWOEQFAYSXBRK-QBFJYBIGSA-N C6H13NO5 25 25 0.692308 0.96
WCWOEQFAYSXBRK-DVKNGEFBSA-N C6H13NO5 25 25 0.692308 0.96
MSWZFWKMSRAUBD-TVIMKVIFSA-N C6H13NO5 25 25 0.777778 0.96
WCWOEQFAYSXBRK-BYIBVSMXSA-N C6H13NO5 25 25 0.692308 0.96
MSWZFWKMSRAUBD-HGVZOGFYSA-N C6H13NO5 25 25 0.777778 0.96
WCWOEQFAYSXBRK-RWOPYEJCSA-N C6H13NO5 25 25 0.692308 0.96
MSWZFWKMSRAUBD-PHYPRBDBSA-N C6H13NO5 25 25 0.777778 0.96
MSWZFWKMSRAUBD-FPRJBGLDSA-N C6H13NO5 25 25 0.777778 0.96

In [10]:
from marsi.io.db import Metabolite

In [11]:
Metabolite.get('WCWOEQFAYSXBRK-FPRJBGLDSA-N')


Out[11]:
FormulaC6H13NO5
InChiInChI=1S/C6H13NO5/c7-6-5(11)4(10)3(9)2(1-8)12-6/h2-6,8-11H,1,7H2/t2-,3+,4+,5-,6-/m1/s1
InChi KeyWCWOEQFAYSXBRK-FPRJBGLDSA-N
Structure - Open Babel Depiction O H 2 N OH OH OH HO
DBszinc: ZINC13544123
Synonyms

In [12]:
Metabolite.get('WCWOEQFAYSXBRK-QBFJYBIGSA-N')


Out[12]:
FormulaC6H13NO5
InChiInChI=1S/C6H13NO5/c7-6-5(11)4(10)3(9)2(1-8)12-6/h2-6,8-11H,1,7H2/t2-,3+,4+,5+,6-/m1/s1
InChi KeyWCWOEQFAYSXBRK-QBFJYBIGSA-N
Structure - Open Babel Depiction O H 2 N OH OH OH HO
DBszinc: ZINC22059796
Synonyms

In [13]:
Metabolite.get('BQCCAEOLPYCBAE-UKFBFLRUSA-N')


Out[13]:
FormulaC6H13NO5
InChiInChI=1S/C6H13NO5/c7-3-4(9)2(1-8)12-6(11)5(3)10/h2-6,8-11H,1,7H2/t2-,3-,4-,5-,6+/m1/s1
InChi KeyBQCCAEOLPYCBAE-UKFBFLRUSA-N
Structure - Open Babel Depiction O HO OH NH 2 OH HO
DBszinc: ZINC83295854
Synonyms

In [ ]: