diff --git a/mhcflurry/random_negative_peptides.py b/mhcflurry/random_negative_peptides.py index 1afa30454eb0384ff700b845a12907f7988b0bab..96f4866512ffa086b32b554751e53765e17b5bd3 100644 --- a/mhcflurry/random_negative_peptides.py +++ b/mhcflurry/random_negative_peptides.py @@ -14,7 +14,7 @@ class RandomNegativePeptides(object): random_negative_constant=25, random_negative_match_distribution=True, random_negative_distribution_smoothing=0.0, - random_negative_method="by_length", + random_negative_method="recommended", random_negative_binder_threshold=None, random_negative_lengths=[8,9,10,11,12,13,14,15]) @@ -63,6 +63,13 @@ class RandomNegativePeptides(object): ] method = self.hyperparameters['random_negative_method'] + if method == 'recommended': + # by_length for allele-specific prediction and by_allele for pan. + method = ( + "by_length" + if alleles is None else + "by_allele") + function = { 'by_length': self.plan_by_length, 'by_allele': self.plan_by_allele, diff --git a/test/test_changing_allele_representations.py b/test/test_changing_allele_representations.py index 271cb3d976fa1f53eb4d818e8806044a54f192fa..cafeac16d0cfa178f4450dea58dba0894b41c886 100644 --- a/test/test_changing_allele_representations.py +++ b/test/test_changing_allele_representations.py @@ -1,3 +1,7 @@ +import logging +logging.getLogger('matplotlib').disabled = True +logging.getLogger('tensorflow').disabled = True + import time import pandas