This is the repository of codes for the paper entitled "Predicting Molecular Fingerprint from Electron-Ionization Mass Spectrum with Deep Neural Networks". This repository only contains the source codes without any data or pretrained models, due to the models were trained by NIST dataset.
optinal:
pycdk
smiles_to_onehot
Data preprocess scripts are used for extracting compound information of NIST into numpy object. They are included in the scripts/read.py , including gathering the SMILES, exact masses, retention indices, Morgan fingerprints, molecular descriptors and mass spectra.
DeepEI contain two main parts of models: 1. Predicting molecular fingerprint from EI-MS (Fingerprint folder); 2. Predicting retention index from structure (retention folder). Each folder contains the codes for data pretreatment, model training and model selection. For FP prediction, we compared for models, which are MLP, XGBoost, LR and PLS-DA. For RI prediction, we compared single-channel CNN, multi-channel CNN and MLP.
The main functions of predication are included in the DeepEI folder. predict_RI function takes SMILES as input and predicts the corresponding retention index. predict_fingerprint function takes mass spectrum as input and predicts the corresponding fingerprints.
The Discussion folder contains the scripts for evaluating the identification performance, and comparing with NEIMS package. The corresponding results are also included. We compared DeepEI, NEIMS and their combination.
The example codes for usage is included in the Usage.ipynb
Contact: ji.hongchao@foxmail.com