Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for NetMHCstabpan (GH Issue #64) #167

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

dhuvik
Copy link
Contributor

@dhuvik dhuvik commented Mar 12, 2024

Files changed - 2

netmhcstabpan.py:

Added a NetMHCstabpan class that inherits from the BaseCommandlinePredictor parent class. The program_name is set to "netMHCstabpan". All other attributes are the same as as in other NetMHC* instances.

parsing.py:

Added a parse_netmhcstabpan function. Maps the Thalf_life to the score index, the identity to the key index, and the %Rank_Stab to the rank_index.

@timodonnell
Copy link
Contributor

Thanks for this contribution @dhuvik . Looks reasonable to me. Could you add a unit test for it?

for i, (expected, actual) in enumerate(zip(web_server_predictions, stability_predictions)):
# Check to make sure that the stability predictions are within 0.01 of the webserver values.
# This could be the result of different versions of dependencies or the nature of the ANN itself.
approx_(expected, actual, tol=0.01, msg="Peptide %d: expected %f but got %f" % (i, expected, actual))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using numpy.testing.assert_allclose here rather than writing your own function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhuvik I've been mercilessly rolling my own testing helpers so might be setting a bad precedent but agree with Tim

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Tim! Will go ahead and make that change

@iskandr
Copy link
Contributor

iskandr commented Mar 12, 2024

Also @timodonnell I still need to add a netmhc-bundle access token to secrets to make the GH Actions unit tests work, it's on my TODO list for this week.

tests/common.py Outdated
@@ -24,6 +24,12 @@ def eq_(x, y, msg=None):
else:
assert x == y, msg

def approx_(x, y, tol=1e-6, msg=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to oblige @timodonnell and call numpy.testing.assert_allclose here?

@iskandr iskandr merged commit 9837a5c into openvax:master Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants