Git Product home page Git Product logo

proteogan's Introduction

ProteoGAN

This repository contains code accompanying "Conditional Generative Modeling for De Novo Protein Design with Hierarchical Functions". It provides the data used to train and evaluate the model, the evaluation metrics, and ProteoGAN itself with pretrained weights.

Note that, due to conflicts with our license, evaluations with UniRep and ProFET embeddings are not included in this repository. However, it is relatively straightforward to include any alternative embedding by providing a mapping function to the modules in proteogan.metrics. (See also bibliography notes below)

To train ProteoGAN, run python -m train.train proteogan 1, where 1 is the split number (1 to 5). Loss curves, generated sequences and model weights are saved to train/split_1/proteogan/. To evaluate the metrics MMD and MRR, run python -m train.eval proteogan 1. Pretrained weights for split 1 are provided with this repository.

You may use the MMD and MRR metrics to evaluate your own generated sequences. Note that the metric values depend on the reference sequence set they are applied to. We provide the reference sets of the paper in this repository. Load them with:

from data.util import load

split = 1
train = load('train', split)
test = load('test', split)
val = load('val', split)

The dataset contains primary sequences of 150.000 proteins and their annotations of 50 GO molecular function labels (compare paper).

Once you have generated some sequences, provide them to MMD and MMR. MRR needs the labels the generated sequences were conditioned on as a list of lists. Usually these would be the labels of a test set you want to compare to.

from metrics.similarity import mmd
from metrics.conditional import mrr

generated = ['MLAVEGSALLVS...', 'MALSEGALSVGELA...', ...] # use your model to generate these, conditioned on test['labels']

MMD = mmd(generated, test['sequence'])
MRR = mrr(generated, test['labels'], test['sequence'], test['labels'])

You may also use train.util.BaseTrainer to implement your own model and reuse our training and evaluation loop. See train/train.py for details.

Citation

If you use code from this repository in your work we kindly ask to cite accordingly:

Currently under review.

Bibliography

The code in this repository is based on the following works:


Abadi, Martín, et al. "Tensorflow: A system for large-scale machine learning." 12th {USENIX} symposium on operating systems design and implementation ({OSDI} 16). 2016.

Da Costa-Luis, Casper, et al. "tqdm: A fast, Extensible Progress Bar for Python and CLI." Zenodo. Apr (2021).

Harris, Charles R., et al. "Array programming with NumPy." Nature 585.7825 (2020): 357-362.

Hunter, John D. "Matplotlib: A 2D graphics environment." Computing in science & engineering 9.03 (2007): 90-95.

Klopfenstein, D. V., et al. "GOATOOLS: A Python library for Gene Ontology analyses." Scientific reports 8.1 (2018): 1-17.

McKinney, Wes. "Data structures for statistical computing in python." Proceedings of the 9th Python in Science Conference. Vol. 445. 2010.

Meanti, Giacomo, et al. "Kernel methods through the roof: handling billions of points efficiently." arXiv preprint arXiv:2006.10350 (2020).

Paszke, Adam, et al. "Pytorch: An imperative style, high-performance deep learning library." Advances in neural information processing systems 32 (2019): 8026-8037.

Virtanen, Pauli, et al. "SciPy 1.0: fundamental algorithms for scientific computing in Python." Nature methods 17.3 (2020): 261-272.

Waskom, Michael L. "Seaborn: statistical data visualization." Journal of Open Source Software 6.60 (2021): 3021.

Although not used in this repository, we refer to the following works as they have been very helpful to obtain the results in the paper:


Alley, Ethan C., et al. "Unified rational protein engineering with sequence-based deep representation learning." Nature methods 16.12 (2019): 1315-1322.

Ma, Eric J., and Arkadij Kummer. "Reimplementing Unirep in JAX." bioRxiv (2020).

Ofer, Dan, and Michal Linial. "ProFET: Feature engineering captures high-level protein functions." Bioinformatics 31.21 (2015): 3429-3436.

proteogan's People

Contributors

proteogan avatar timkucera avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.