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

Switch default predictor to ensemble, fix download bug, add more imports to...

Switch default predictor to ensemble, fix download bug, add more imports to package-level __init__, update example ipython notebook
parent 1a06153a
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ env:
script:
# download data and models, then run tests
- mhcflurry-downloads fetch
- mhcflurry-downloads fetch models_class1_allele_specific_ensemble
- mhcflurry-downloads fetch models_class1_allele_specific_single
- mhcflurry-downloads info # just to test this command works
- nosetests test --with-coverage --cover-package=mhcflurry && ./lint.sh
after_success:
......
This diff is collapsed.
......@@ -15,6 +15,10 @@
from .class1_allele_specific.class1_binding_predictor import (
Class1BindingPredictor)
from .predict import predict
from .affinity_measurement_dataset import AffinityMeasurementDataset
from .class1_allele_specific_ensemble import Class1EnsembleMultiAllelePredictor
from .class1_allele_specific import Class1SingleModelMultiAllelePredictor
from . import parallelism
__version__ = "0.2.0"
......@@ -23,5 +27,8 @@ __all__ = [
"Class1BindingPredictor",
"predict",
"parallelism",
"AffinityMeasurementDataset",
"Class1EnsembleMultiAllelePredictor",
"Class1SingleModelMultiAllelePredictor",
"__version__",
]
......@@ -22,11 +22,11 @@ releases:
downloads:
- name: models_class1_allele_specific_ensemble
url: http://github.com/hammerlab/mhcflurry/releases/download/0.1.0-alpha1/models_class1_allele_specific_ensemble.tar.bz2
default: false
default: true
- name: models_class1_allele_specific_single
url: http://github.com/hammerlab/mhcflurry/releases/download/0.0.8/models_class1_allele_specific_single.no_impute.tar.bz2
default: true
default: false
- name: data_kim2014
url: http://github.com/hammerlab/mhcflurry/releases/download/0.0.8/data_kim2014.tar.bz2
......
......@@ -197,7 +197,7 @@ def fetch_subcommand(args):
logging.debug("Extracting: %s" % names)
bad_names = [
n for n in names
if n.strip().startswith("/") or n.strip().startswith(".")
if n.strip().startswith("/") or n.strip().startswith("..")
]
if bad_names:
raise RuntimeError(
......
......@@ -16,10 +16,11 @@ from collections import OrderedDict
import pandas as pandas
from .class1_allele_specific import class1_single_model_multi_allele_predictor
from .class1_allele_specific_ensemble import class1_ensemble_multi_allele_predictor
from .common import normalize_allele_name, UnsupportedAllele
from .peptide_encoding import encode_peptides
def predict(alleles, peptides, predictor=None):
"""
Make predictions across all combinations of the specified alleles and
......@@ -40,7 +41,7 @@ def predict(alleles, peptides, predictor=None):
encoded_peptides = encode_peptides(peptides)
if predictor is None:
predictor = class1_single_model_multi_allele_predictor.get_downloaded_predictor()
predictor = class1_ensemble_multi_allele_predictor.get_downloaded_predictor()
result_dict = OrderedDict([
("Allele", []),
("Peptide", []),
......
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