Skip to content

Repository files navigation

🧬 Dark Kinome Preprocessing Pipeline

A reproducible, six-step pipeline that turns raw kinase biology into contrastive-learning–ready tensors — across 181 kinases and 7 families.

License: MIT Python 3.9+ PyTorch RDKit ESM-2

Kinases Families Training pairs Scaffolds


Companion code release for the paper "Dark Kinome Chemical Space: A Survey of Computational Approaches and a Reproducible Multi-Family Preprocessing Pipeline for Scaffold Transfer Learning."

The pipeline transforms raw biological data — protein sequences, bioactivity measurements, and structural databases — into PyTorch-ready tensors for contrastive learning between kinase pocket embeddings and chemical scaffold fingerprints. It scales the original 23-kinase (AGC-only) dataset up to 181 kinases across all 7 major kinase families (AGC, CMGC, CAMK, CK1, STE, TK, TKL).

📦 Code vs. data. This repository holds code only. The processed datasets (embeddings, fingerprints, kinase–scaffold pairs, and the packaged training tensors — ~938 MB) are deposited separately on Zenodo: [Zenodo DOI] because individual files exceed GitHub's size limits.

🔬 Pipeline at a glance

flowchart LR
    U["🧬 UniProt<br/>sequences"] --> S1["Step 1<br/>Sequence cleaning"]
    C["💊 ChEMBL<br/>bioactivities"] --> S2["Step 2<br/>Scaffold extraction"]
    K["🔷 KLIFS<br/>structures"] --> S3["Step 3<br/>Pocket mapping"]
    S1 --> S3
    S1 --> S4["Step 4<br/>ESM-2 embeddings"]
    S3 --> S4
    S2 --> S5["Step 5<br/>Morgan fingerprints"]
    S4 --> S6["Step 6<br/>Dataset construction"]
    S5 --> S6
    S2 --> S6
    S6 --> OUT["🎯 train / val / dark<br/>PyTorch tensors"]
Loading
# Script Does Key output
1 step1_uniprot_cleaning.py One canonical Swiss-Prot sequence per kinase kinases_181_canonical.fasta (180 seqs)
2 step2_chembl_cleaning.py Standardise SMILES → Bemis–Murcko scaffolds → aggregate bioactivity kinase_scaffold_pairs.csv (69,978 pairs)
3 step3_klifs_mapping.py Map the 85-residue KLIFS ATP pocket onto each sequence pocket_positions.json (176 kinases)
4 step4_esm2_embeddings.py ESM-2 650M → mean-pooled 1280-d pocket embedding protein_embeddings.pt (176 × 1280)
5 step5_scaffold_fingerprints.py Scaffold SMILES → 2048-bit Morgan (ECFP4) scaffold_fingerprints.npz (42,908 × 2048)
6 step6_dataset_construction.py Assemble family-stratified train / val / dark splits train_dataset.pt, val_dataset.pt, dark_kinases.pt

📊 What comes out

Split Kinases Pairs Unique scaffolds
Training 97 62,817 41,171
Validation (family-stratified) 10 3,218 2,926
Dark (zero-shot targets) 66
  • Protein embeddings: 176 kinases × 1280-d (ESM-2, pocket mean-pooled)
  • Scaffold fingerprints: 42,908 × 2048-bit (Morgan r=2)
  • Zero train/val/dark leakage — verified in Step 6

Embedding sanity checks recover known biology (e.g. PRKACA≈PRKACB cosine 0.999, JAK1≈JAK2 0.995, distant EGFR/ROCK1 0.49). Full per-step breakdown in preprocessing_pipeline_summary.md.

🗂️ Repository layout

dark-kinome-preprocessing/       <- this repo (code only)
├── step1_uniprot_cleaning.py
├── step2_chembl_cleaning.py
├── step3_klifs_mapping.py
├── step4_esm2_embeddings.py
├── step5_scaffold_fingerprints.py
├── step6_dataset_construction.py
├── preprocessing_pipeline_summary.md   <- full results & runtimes
├── requirements.txt
└── LICENSE

The scripts expect a datasets/ folder (from Zenodo) as a sibling of this repo — they locate it automatically via Path(__file__).resolve().parent.parent / "datasets", so no path editing is needed:

your-projects-folder/
├── dark-kinome-preprocessing/   <- this repo
└── datasets/                    <- from Zenodo
    ├── uniprot/uniprot.fasta
    ├── chembl/ChEMBL_181_bioactivities.csv
    ├── klifs/KLIFS_181_structures.csv
    └── processed/               <- created by the scripts as they run

🚀 Quickstart

git clone https://github.com/Nihal180804/dark-kinome-preprocessing.git
cd dark-kinome-preprocessing
pip install -r requirements.txt
# then place the Zenodo `datasets/` folder alongside this repo (see above)

Run the steps in order — each depends on the previous ones' output:

python step1_uniprot_cleaning.py
python step2_chembl_cleaning.py
python step3_klifs_mapping.py
python step4_esm2_embeddings.py
python step5_scaffold_fingerprints.py
python step6_dataset_construction.py

step3_klifs_mapping.py also accepts CLI overrides (--fasta, --klifs-csv, --output-json, …) to point at custom file locations.

⏱️ Runtime: ~4 hours end-to-end on CPU, dominated by Step 2 (~2.5 h of ChEMBL SMILES standardisation) and Step 4 (~60 min of ESM-2 embeddings). See the summary for the per-step breakdown.

Already have the processed data?

To skip Steps 1–5, download the pre-processed embeddings, fingerprints, and pair files from the Zenodo record into datasets/processed/ and run only Step 6.

📖 Citation

If you use this pipeline or dataset, please cite:

@article{darkkinome2026,
  title   = {Dark Kinome Chemical Space: A Survey of Computational Approaches
             and a Reproducible Multi-Family Preprocessing Pipeline for
             Scaffold Transfer Learning},
  author  = {Sukruthi N, Lakshya and Ahmad, Nehan and J, Nihal and
             J, Yashas and K, Manjula},
  year    = {2026},
  note    = {Code: https://github.com/Nihal180804/dark-kinome-preprocessing;
             Data: [Zenodo DOI]}
}

📄 License

Released under the MIT License.

Department of Computer Science and Engineering (AI&ML), PES University, India

About

Reproducible multi-family preprocessing pipeline for dark kinome scaffold transfer learning (181 kinases, ESM-2 pocket embeddings, Morgan scaffold fingerprints, kinase-scaffold binding pairs).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages