SMPrecursorPredictor
A ML pipeline for the prediction of specialised metabolites starting substances.
Installation
Manually
- Clone the repository and move into the directory:
git clone
cd SMPrecursorPredictor
- Create a conda environment and activate it:
conda create -n sm_precursor_predictor python=3.10
conda activate sm_precursor_predictor
- Install the dependencies:
pip install -r requirements.txt
- Install the package:
pip install .
Pypi
- Create a conda environment and activate it:
conda create -n sm_precursor_predictor python=3.10
conda activate sm_precursor_predictor
pip install SMPrecursorPrediction
Making predictions
Models available:
- Layered FP + Low Variance FS + Ridge Classifier
- Morgan FP + Ridge Classifier
from sm_precursor_predictor import predict_precursors
precursors = predict_precursors(
["[H][C@]89CN(CCc1c([nH]c2ccccc12)[C@@](C(=O)OC)(c3cc4c(cc3OC)N(C)[C@@]5([H])[C@@]"
"(O)(C(=O)OC)[C@H](OC(C)=O)[C@]7(CC)C=CCN6CC[C@]45[C@@]67[H])C8)C[C@](O)(CC)C9",
"COC1=C(C=CC(=C1)C2=C(C(=O)C3=C(C=C(C=C3O2)O)O)O[C@H]4[C@@H]([C@H]([C@H]([C@H](O4)CO)O)O)O)O"],
model="Layered FP + Low Variance FS + Ridge Classifier")
print(precursors)
or
read a csv file with a column of SMILES and a column of IDs and save the predictions in a csv file:
from sm_precursor_predictor import predict_from_csv
predictions = predict_from_csv("path_to_csv",
smiles_field="SMILES",
ids_field="ID",
model="Layered FP + Low Variance FS + Ridge Classifier")
predictions.to_csv("path_to_save_predictions.csv")
Making and explaining predictions
This is only possible with one model: Morgan FP + Ridge Classifier.
Example with linalool:
from sm_precursor_predictor import get_prediction_and_explanation
prediction, images, plots = get_prediction_and_explanation(smiles="CC(=CCCC(C)(C=C)O)C", threshold=0.20)
prediction
['Geranyl diphosphate']
images[0]
Metadata
Release files for SMPrecursorPrediction 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SMPrecursorPrediction-0.0.2.tar.gz | 338.2 kB | Without provenance | Details for SMPrecursorPrediction-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SMPrecursorPrediction-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for SMPrecursorPrediction-0.0.2-py3-none-any.whl |
Total release size: 676.6 kB
Release files / SMPrecursorPrediction-0.0.2.tar.gz
| Download URL | SMPrecursorPrediction-0.0.2.tar.gz |
|---|---|
| Size | 338.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55870beb2ebded67b6a4c9a901ca774161a0958b8766a4c49e8363da2bf77810
|
|
BLAKE2b-256 checksum How to use checksums |
363c1465c1c4144be9fddb6c30d158058cacd5e569f2961142b4f07d2f73c8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Release files / SMPrecursorPrediction-0.0.2-py3-none-any.whl
| Download URL | SMPrecursorPrediction-0.0.2-py3-none-any.whl |
|---|---|
| Size | 338.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
455015b74bdb59ba867ccc6b6687b493416ed9a90b7666f85b5914bad4e19bdb
|
|
BLAKE2b-256 checksum How to use checksums |
1b30d5b82523924d55e3a23297a497ebbcc226115153aca3c7002a281a2b702b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.14
|
Security for SMPrecursorPrediction 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.