Skip to content
Snippets Groups Projects
Commit d4823d2a authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

If the presentation models are downloaded but not the affinity models, use the...

If the presentation models are downloaded but not the affinity models, use the affinity predictor included with the presentation models. Also, bump version to 1.6.1.
parent 755451f9
No related branches found
No related tags found
No related merge requests found
......@@ -453,7 +453,19 @@ class Class1AffinityPredictor(object):
`Class1AffinityPredictor` instance
"""
if models_dir is None:
models_dir = get_default_class1_models_dir()
try:
models_dir = get_default_class1_models_dir()
except RuntimeError as e:
# Fall back to the affinity predictor included in presentation
# predictor if possible.
from mhcflurry.class1_presentation_predictor import (
Class1PresentationPredictor)
try:
presentation_predictor = Class1PresentationPredictor.load()
return presentation_predictor.affinity_predictor
except RuntimeError:
raise e
if optimization_level is None:
optimization_level = OPTIMIZATION_LEVEL
......
__version__ = "1.6.0"
__version__ = "1.6.1"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment