This repository contains the public notebook and figure outputs for a cheminformatics and machine learning project focused on identifying structural patterns associated with anthelmintic bioactivity.
The private dataset is intentionally not included.
The project asks whether molecular fingerprints, descriptors, scaffolds, and machine learning models can help:
- predict which compounds are likely bioactive
- identify structural motifs enriched in positive hits
- explain which Morgan and Mordred features are associated with activity
- prioritize compounds for follow-up virtual screening
notebooks/: polished Jupyter notebooks forming the analysis pipelinefigures/: exported plots and text summaries from the notebooks
The raw and processed datasets are excluded because they are private.
| Notebook | Purpose |
|---|---|
01_data_standardization.ipynb |
Cleans raw molecular data, validates SMILES, standardizes structures, removes duplicates, and creates the curated dataset. |
02_dataset_characterization.ipynb |
Summarizes class balance and compound source distribution. |
03_chemical_space_analysis.ipynb |
Compares active vs inactive compounds using physicochemical descriptors and Morgan fingerprint PCA. |
04_scaffold_analysis.ipynb |
Examines scaffold diversity and scaffold-level activity enrichment. |
05_fragment_enrichment.ipynb |
Tests which ECFP4/Morgan bits are statistically enriched in active compounds. |
06_scaffold_aware_modeling.ipynb |
Benchmarks machine learning models using scaffold-aware validation. |
07_model_interpretability.ipynb |
Interprets the best model by linking important ECFP4 bits to representative fragments. |
09_clustering_analysis.ipynb |
Clusters positive hits and compares Mordred/Morgan feature patterns between active and inactive compounds. |
Notebook 08 was removed because the graph neural network baseline was not needed for the final project narrative.
After standardization, the dataset contains 27,390 compounds and 299 positives. Because positives are rare, accuracy is not a meaningful modeling metric. The project focuses on PR-AUC, enrichment factors, and top-ranked hit recovery.
Active compounds are not randomly distributed across chemical space. Compared with inactive compounds, actives tend to be larger, more polar, more hydrogen-bonding, less aromatic, and slightly less lipophilic.
Scaffold analysis shows broad chemotype diversity and scaffold-level activity enrichment. This supports using scaffold-aware splitting to avoid overly optimistic results from close analogs appearing in both train and test sets.
The fragment enrichment analysis found 306 ECFP4 bits significant at BH q < 0.05. These bits represent candidate structural environments associated with positive bioactivity, with representative active-hit fragments exported for interpretation.
Under scaffold-aware validation, the best model was Random Forest using ECFP4 fingerprints:
- PR-AUC: 0.795
- ROC-AUC: 0.961
- EF@1%: 74.4
- Precision@50: 0.92
This suggests the model is effective for ranking likely bioactive compounds near the top of a virtual-screening list.
The best model relied on ECFP4 bits that partially overlapped with statistically enriched fragments. Thirteen of the top 50 model-important bits were also significant in fragment enrichment, strengthening the evidence that these structural motifs are meaningful rather than random model artifacts.
Positive-hit clustering showed clearer structure in Mordred descriptor space than Morgan/Jaccard space. Mordred clustering selected k=2 with silhouette 0.446, suggesting at least two interpretable positive-hit subtypes.
Active compounds showed higher values for descriptors such as nSpiro, ATS8i, ATS8se, ATS8are, and ATS8pe, and lower values for aromatic atom/bond descriptors. Morgan enrichment provided complementary structural motif hypotheses.
Some active-vs-inactive comparisons are source-confounded because positives and negatives are not evenly distributed across compound sources. The strongest interpretation is therefore associative: the identified features and fragments are hypotheses for bioactivity, not definitive causal mechanisms.
The notebooks are included for transparency and review. To rerun the full workflow, the private raw dataset and generated processed feature tables are required but are not distributed in this repository.