MCPcopy Index your code
hub / github.com/Mew233/pairwise

github.com/Mew233/pairwise @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
186 symbols 498 edges 20 files 10 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PAIRWISE

PAIRWISE is an all-in-one package for drug synergy prediction. This package allows the user to conduct standardized experiments to compare the prediction performance between reviewed methods.

The user can freely include new datasets, and select preferential cell/drug features to train the deep learning model.


Installation

# Unzip 
unzip pairwise.zip
cd pairwise/

#create conda environment
conda env create --name pairwise --file=environment.yml
conda activate pairwise
#To install for PyTorch 1.10.0, simply run on your mac
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.10.0+${cpu}.html
pip install torch-geometric -f https://pytorch-geometric.com/whl/torch-1.10.0+${cpu}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.10.0+${cpu}.html 
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.10.0+${cpu}.html 
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.10.0+${cpu}.html

#install pairwise
pip install -e .

#Please download data/ and put it in the same path as setup.py
[data folder] https://zenodo.org/records/18263823

If you are using Mac M1 chip, we recommend checking out this github issue for installation of required dependencies


Getting strarted

 python pairwise/main.py --model 'deepsynergy_preuer' --synergy_df 'p13' --train_test_mode train

Features explained

Model Input feature format Feature encoders Features concatenated Drug1 and drug2 summed
Cell line Drug Cell line Drug Cell line Drug
PAIRWISE exp Chemical structures, Drug-target interaction from DrugTargetCommons v2.0 Autoencoders Pretrained foundation model, DNN False
ML approaches: LR,RF,XGBoost,ERT exp or cnv or mut Drug-target interaction True
DeepSynergy exp Drug chemical descriptor or fingerprints DNN DNN True
MatchMaker exp Drug chemical descriptor or fingerprints DNN DNN False
Multitask_DNN exp Morgan or MACCS fingerprints, Drug-target interaction DNN DNN False False
DeepDDS exp SMILES2Graph MLP GCN False
TGSynergy exp SMILES2Graph GCN GCN False
TranSynergy exp Network propagated Drug-target interaction or morgan_fingerprint,smiles,smiles2graph Transformer GCN(RWR)+Transformer False
GraphSynergy cell_protein,PPI network drug_protein,PPI network GCN GCN False

Data downloaded

PAIWISE used multi-omics datasets. 1. We have provided a cleaned benchmark synergy truset. For details of reporducing, please go to trueset_generation/ to follow the instructions. 2. CCLE dataset including exp, cnv, mut 3. Drug-target interaction dataset from DrugComb, and structures.sdf which enables fingerprints calculation or smiles2graph Link and please put into Data/ folder


Models included

In detail, the following drug synergy prediction models were implemented. - Baseline machine Learning models (random forest, extreme gradient boosting, extremely randomized tree, logistic regression)


Customized dataset

Use customized dataset to test. The testing drug combos are sourced from specialized tissues. The testing results are stored in /results/predicts_"Model"_"Customized".csv


License

MIT

Core symbols most depended-on inside this repo

get_model
called by 10
pairwise/get_model.py
split_it
called by 10
pairwise/utilitis.py
split_it_cell
called by 5
pairwise/utilitis.py
dataloader
called by 4
pairwise/dataloader.py
dataloader_graph
called by 4
pairwise/dataloader.py
k_fold_trainer
called by 4
pairwise/dataloader.py
SHAP
called by 4
pairwise/dataloader.py
getActivation
called by 4
pairwise/dataloader.py

Shape

Method 78
Function 77
Class 31

Languages

Python100%

Modules by API surface

pairwise/utilitis.py45 symbols
pairwise/dataloader.py27 symbols
pairwise/prepare_data.py22 symbols
pairwise/models/pairwise.py15 symbols
pairwise/models/transynergy_liu.py13 symbols
pairwise/models/granuality.py12 symbols
pairwise/models/graphsynergy.py10 symbols
pairwise/models/TGSynergy.py10 symbols
pairwise/select_features.py8 symbols
pairwise/models/baselines.py5 symbols
pairwise/pipeline.py4 symbols
pairwise/models/multitaskdnn_kim.py3 symbols

For agents

$ claude mcp add pairwise \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact