From c1ea03b473f81532b3f0439d9a205c1789a7dfda Mon Sep 17 00:00:00 2001 From: Tim O'Donnell <timodonnell@gmail.com> Date: Mon, 13 Nov 2017 14:33:57 -0500 Subject: [PATCH] Update README with conda instructions. Closes #110 --- README.md | 28 ++++++++++++++++++- .../class1_neural_network.py | 2 +- requirements.txt | 2 +- setup.py | 6 ++-- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 99945648..8bfc7c72 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you find MHCflurry useful in your research please cite: > O'Donnell, T. et al., 2017. MHCflurry: open-source class I MHC binding affinity prediction. bioRxiv. Available at: http://www.biorxiv.org/content/early/2017/08/09/174243. -## Setup +## Setup (pip) Install the package: @@ -56,6 +56,32 @@ export KERAS_BACKEND=theano You may also needs to `pip install theano`. +## Setup (conda) + +You can alternatively get up and running with a [conda](https://conda.io/docs/) +environment as follows: + +``` +conda create -q -n mhcflurry-env python=3.6 'tensorflow>=1.1.0' +source activate mhcflurry-env +``` + +Then continue as above: + +``` +pip install mhcflurry +mhcflurry-downloads fetch +``` + +If you wish to test your installation, you can install `nose` and run the tests +from a checkout: + +``` +pip install nose +nosetests . +``` + + ## Making predictions from the command-line diff --git a/mhcflurry/class1_affinity_prediction/class1_neural_network.py b/mhcflurry/class1_affinity_prediction/class1_neural_network.py index fe8de016..8e2a638e 100644 --- a/mhcflurry/class1_affinity_prediction/class1_neural_network.py +++ b/mhcflurry/class1_affinity_prediction/class1_neural_network.py @@ -9,7 +9,7 @@ import keras.models import keras.layers.pooling import keras.regularizers from keras.layers import Input -import keras.layers.merge +import keras.layers from keras.layers.core import Dense, Flatten, Dropout from keras.layers.embeddings import Embedding from keras.layers.normalization import BatchNormalization diff --git a/requirements.txt b/requirements.txt index 67444843..8d31007f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ six numpy>=1.11 pandas>=0.13.1 Keras==2.0.9 -tensorflow>=1.4.0 +tensorflow>=1.1.0 appdirs scikit-learn typechecks diff --git a/setup.py b/setup.py index 5eeec1c5..6f45d037 100644 --- a/setup.py +++ b/setup.py @@ -30,14 +30,14 @@ try: with open(readme_filename, 'r') as f: readme = f.read() except: - logging.warn("Failed to load %s" % readme_filename) + logging.warning("Failed to load %s" % readme_filename) readme = "" try: import pypandoc readme = pypandoc.convert(readme, to='rst', format='md') except: - logging.warn("Conversion of long_description from MD to RST failed") + logging.warning("Conversion of long_description from MD to RST failed") pass with open('mhcflurry/__init__.py', 'r') as f: @@ -53,7 +53,7 @@ if __name__ == '__main__': 'pandas>=0.13.1', 'Keras==2.0.9', 'appdirs', - 'tensorflow>=1.4.0', + 'tensorflow>=1.1.0', 'scikit-learn', 'typechecks', 'mhcnames', -- GitLab