Skip to content

Commit

Permalink
skip IEDB tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iskandr committed Mar 25, 2024
1 parent d71ac4d commit 781c756
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 0 additions & 2 deletions mhctools/iedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


import pandas as pd
import numpy as np
from mhcnames.normalization import normalize_allele_name

from .base_predictor import BasePredictor
Expand Down Expand Up @@ -174,7 +173,6 @@ def _get_iedb_request_params(self, sequence, allele, peptide_lengths):
}
if self.include_length_in_request:
params["length"] = seq_to_str(peptide_lengths)

return params

def predict_peptides(self, peptides):
Expand Down
12 changes: 10 additions & 2 deletions tests/predictor_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
mhc1_predictor_classes = [
mhctools.NetMHCpan,
mhctools.NetMHC,
mhctools.NetMHC4,
mhctools.NetMHC4
]

# for now excluding because of 403 errors
mhc1_iedb_predictors = [
mhctools.IedbNetMHCcons,
mhctools.IedbNetMHCpan,
mhctools.IedbSMM,
Expand All @@ -19,5 +23,9 @@

mhc2_predictor_classes = [
mhctools.NetMHCIIpan,
]

# for now excluding because of 403 errors
mhc2_iedb_predictors = [
mhctools.IedbNetMHCIIpan,
]
]
5 changes: 3 additions & 2 deletions tests/test_iedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
from mhctools import IedbNetMHCpan
from .common import assert_raises

Expand All @@ -22,7 +23,7 @@
"TP53-001": "ASILLLVFYW"
}


@pytest.mark.xfail(reason="IEDB server giving 403 errors from GitHub actions runners")
def test_netmhcpan_iedb():
predictor = IedbNetMHCpan(alleles=[DEFAULT_ALLELE])
binding_predictions = predictor.predict_subsequences(
Expand All @@ -37,7 +38,7 @@ def test_netmhcpan_iedb():
assert len(binding_predictions) == 10, \
"Expected 4 binding predictions from %s" % (binding_predictions,)


@pytest.mark.xfail(reason="IEDB server giving 403 errors from GitHub actions runners")
def test_netmhcpan_iedb_unsupported_allele():
predictor = IedbNetMHCpan(alleles=[DEFAULT_ALLELE, UNSUPPORTED_ALLELE], raise_on_error=False)
binding_predictions = predictor.predict_subsequences(
Expand Down

0 comments on commit 781c756

Please sign in to comment.