{"id":15175695,"url":"https://github.com/paccmann/paccmann_predictor","last_synced_at":"2025-10-26T11:31:12.779Z","repository":{"id":47000636,"uuid":"219031433","full_name":"PaccMann/paccmann_predictor","owner":"PaccMann","description":"PyTorch implementation of bimodal neural networks for drug-cell (pharmarcogenomics) and drug-protein (proteochemometrics) interaction prediction","archived":false,"fork":false,"pushed_at":"2024-05-21T14:48:29.000Z","size":207,"stargazers_count":50,"open_issues_count":0,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T18:53:01.987Z","etag":null,"topics":["deep-learning","drug-interaction","drug-sensitivity","pharmacogenomics","proteochemometrics","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaccMann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-01T17:24:24.000Z","updated_at":"2024-11-29T09:56:21.000Z","dependencies_parsed_at":"2022-08-31T17:02:02.178Z","dependency_job_id":"30192b8a-d131-43db-86ca-e6bdc913b941","html_url":"https://github.com/PaccMann/paccmann_predictor","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaccMann%2Fpaccmann_predictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaccMann%2Fpaccmann_predictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaccMann%2Fpaccmann_predictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaccMann%2Fpaccmann_predictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaccMann","download_url":"https://codeload.github.com/PaccMann/paccmann_predictor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238319416,"owners_count":19452336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","drug-interaction","drug-sensitivity","pharmacogenomics","proteochemometrics","pytorch"],"created_at":"2024-09-27T12:40:18.845Z","updated_at":"2025-10-26T11:31:12.229Z","avatar_url":"https://github.com/PaccMann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/PaccMann/paccmann_predictor/actions/workflows/build.yml/badge.svg)](https://github.com/PaccMann/paccmann_predictor/actions/workflows/build.yml)\n\n# paccmann_predictor\n\nDrug interaction prediction with PaccMann.\n\n`paccmann_predictor` is a package for drug interaction prediction, with examples of \nanticancer drug sensitivity prediction and drug target affinity prediction. Please see our papers:\n\n- [_Toward explainable anticancer compound sensitivity prediction via multimodal attention-based convolutional encoders_](https://doi.org/10.1021/acs.molpharmaceut.9b00520) (*Molecular Pharmaceutics*, 2019). This is the original paper on IC50 prediction using drug properties and tissue-specific cell line information (gene expression profiles). While the original code was written in `tensorflow` and is available [here](https://github.com/drugilsberg/paccmann), this is the `pytorch` implementation of the best PaccMann architecture (multiscale convolutional encoder).\n\n\n**PaccMann for affinity prediction:**\n- [Data-driven molecular design for discovery and synthesis of novel ligands: a case study on SARS-CoV-2](https://iopscience.iop.org/article/10.1088/2632-2153/abe808) (_Machine Learning: Science and Technology_, 2021). In there, we propose a slightly modified version to predict drug-target binding affinities based on protein sequences and SMILES\n\n![Graphical abstract](https://github.com/PaccMann/paccmann_predictor/blob/master/assets/paccmann.png \"Graphical abstract\")\n\n## Installation\nThe library itself has few dependencies (see [setup.py](setup.py)) with loose requirements. \nFirst, set up the environment as follows:\n```sh\nconda env create -f examples/IC50/conda.yml\nconda activate paccmann_predictor\npip install -e .\n```\n\n\n## Evaluate pretrained drug sensitivty model on your own data\nFirst, please consider using our public [PaccMann webservice](https://ibm.biz/paccmann-aas) as described in the [NAR paper](https://academic.oup.com/nar/article/48/W1/W502/5836770).\n\nTo use our pretrained model, please download the model from: https://ibm.biz/paccmann-data (just download `models/single_pytorch_model`).\nFor example, assuming that you:\n1. Set up your conda environment as described above;\n2. Downloaded the model linked above in a directory called `single_pytorch_model` and\n3. Downloaded the data from https://ibm.box.com/v/paccmann-pytoda-data in folders `data` and `splitted_data`;\nthen, the following command should work:\n```console\n(paccmann_predictor) $ python examples/IC50/test_paccmann.py \\\nsplitted_data/gdsc_cell_line_ic50_test_fraction_0.1_id_997_seed_42.csv \\\ndata/gene_expression/gdsc-rnaseq_gene-expression.csv \\\ndata/smiles/gdsc.smi \\\ndata/2128_genes.pkl \\\nsingle_pytorch_model/smiles_language \\\nsingle_pytorch_model/weights/best_mse_paccmann_v2.pt \\\nresults \\\nsingle_pytorch_model/model_params.json\n```\n*NOTE*: If you bring your own data, please make sure to provide the omic data for the 2128 genes specified in `data/2128_genes.pkl`. Your omic data (here it is `data/gene_expression/gdsc-rnaseq_gene-expression.csv`) can contain more columns and it does not need to follow the order of the pickled gene list. But please dont change this pickle file. Also note that this is PaccMannV2 which is slightly improved compared to the paper version (context attention on both modalities).\n\n## Finetuning on your own data\nYou can also **finetune** our pretrained model on your data instead of training a model from scratch. For that, please follow the instruction below for training on scratch and just set:\n- `model_path` --\u003e directory where the `single_pytorch_model` is stored\n- `training_name` --\u003e this should be `single_pytorch_model`\n- `params_filepath` --\u003e `base_path/single_pytorch_model/model_params.json`\n\n\n## Training a model from scratch\nTo run the example training script we provide environment files under `examples/IC50/`.\nIn the `examples` directory is a training script [train_paccmann.py](./examples/IC50/train_paccmann.py) that makes use\nof `paccmann_predictor`.\n\n```console\n(paccmann_predictor) $ python examples/IC50/train_paccmann.py -h\nusage: train_paccmann.py [-h]\n                         train_sensitivity_filepath test_sensitivity_filepath\n                         gep_filepath smi_filepath gene_filepath\n                         smiles_language_filepath model_path params_filepath\n                         training_name\n\npositional arguments:\n  train_sensitivity_filepath\n                        Path to the drug sensitivity (IC50) data.\n  test_sensitivity_filepath\n                        Path to the drug sensitivity (IC50) data.\n  gep_filepath          Path to the gene expression profile data.\n  smi_filepath          Path to the SMILES data.\n  gene_filepath         Path to a pickle object containing list of genes.\n  smiles_language_filepath\n                        Path to a pickle object a SMILES language object.\n  model_path            Directory where the model will be stored.\n  params_filepath       Path to the parameter file.\n  training_name         Name for the training.\n\noptional arguments:\n  -h, --help            show this help message and exit\n```\n\n`params_filepath` could point to [examples/IC50/example_params.json](examples/IC50/example_params.json), examples for other files can be downloaded from [here](https://ibm.box.com/v/paccmann-pytoda-data).\n\n## References\n\nIf you use `paccmann_predictor` in your projects, please cite the following:\n\n```bib\n@article{manica2019paccmann,\n  title={Toward explainable anticancer compound sensitivity prediction via multimodal attention-based convolutional encoders},\n  author={Manica, Matteo and Oskooei, Ali and Born, Jannis and Subramanian, Vigneshwari and S{\\'a}ez-Rodr{\\'\\i}guez, Julio and Mart{\\'\\i}nez, Mar{\\'\\i}a Rodr{\\'\\i}guez},\n  journal={Molecular pharmaceutics},\n  volume={16},\n  number={12},\n  pages={4797--4806},\n  year={2019},\n  publisher={ACS Publications},\n  doi = {10.1021/acs.molpharmaceut.9b00520},\n  note = {PMID: 31618586}\n}\n\n@article{born2021datadriven,\n  author = {Born, Jannis and Manica, Matteo and Cadow, Joris and Markert, Greta and Mill, Nil Adell and Filipavicius, Modestas and Janakarajan, Nikita and Cardinale, Antonio and Laino, Teodoro and {Rodr{\\'{i}}guez Mart{\\'{i}}nez}, Mar{\\'{i}}a},\n  doi = {10.1088/2632-2153/abe808},\n  issn = {2632-2153},\n  journal = {Machine Learning: Science and Technology},\n  number = {2},\n  pages = {025024},\n  title = {{Data-driven molecular design for discovery and synthesis of novel ligands: a case study on SARS-CoV-2}},\n  url = {https://iopscience.iop.org/article/10.1088/2632-2153/abe808},\n  volume = {2},\n  year = {2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaccmann%2Fpaccmann_predictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaccmann%2Fpaccmann_predictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaccmann%2Fpaccmann_predictor/lists"}