Skip to main content

Python interface to running command-line and web-based MHC binding predictors

Project description

`|Build Status| <https://travis-ci.org/hammerlab/mhctools>`_ `|Coverage
Status| <https://coveralls.io/r/hammerlab/mhctools?branch=master>`_
`|DOI| <https://zenodo.org/badge/latestdoi/18834/hammerlab/mhctools>`_

mhctools
========

Python interface to running command-line and web-based MHC binding
predictors.

Example
-------

\`\`\`python from mhctools import NetMHCpan # Run NetMHCpan for alleles
HLA-A*01:01 and HLA-A*02:01 predictor = NetMHCpan(alleles=["A\*02:01",
"hla-a0101"])

scan the short proteins 1L2Y and 1L3Y for epitopes
==================================================

protein\_sequences = { "1L2Y": "NLYIQWLKDGGPSSGRPPPS", "1L3Y":
"ECDTINCERYNGQVCGGPGRGLCFCGKCRCHPGFEGSACQA" }

epitope\_collection = predictor.predict(protein\_sequences)

flatten binding predictions into a Pandas DataFrame
===================================================

df = epitope\_collection.dataframe()

epitope collection is sorted by percentile rank
===============================================

of binding predictions
======================

strongest\_predicted\_binder = epitope\_collection[0] \`\`\` ## API

The following models are available in ``mhctools``: \* ``NetMHC3``:
requires locally installed version of `NetMHC
3.x <http://www.cbs.dtu.dk/services/NetMHC-3.4/>`_ \* ``NetMHC4``:
requires locally installed version of `NetMHC
4.x <http://www.cbs.dtu.dk/services/NetMHC/>`_ \* ``NetMHC``: a wrapper
function to automatically use ``NetMHC3`` or ``NetMHC4`` depending on
what's installed. \* ``NetMHCpan``: requires locally installed version
of `NetMHCpan <http://www.cbs.dtu.dk/services/NetMHCpan/>`_ \*
``NetMHCIIpan``: requires locally installed version of
`NetMHCIIpan <http://www.cbs.dtu.dk/services/NetMHCIIpan/>`_ \*
``NetMHCcons``: requires locally installed version of
`NetMHCcons <http://www.cbs.dtu.dk/services/NetMHCcons/>`_ \*
``IedbMhcClass1``: Uses IEDB's REST API for class I binding predictions.
\* ``IedbMhcClass2``: Uses IEDB's REST API for class II binding
predictions. \* ``RandomBindingPredictor``: Creates binding predictions
with random IC50 and percentile rank values.

Every model is constructed with an ``alleles`` argument specifying the
HLA type for which to make predictions. Predictions are generated by
calling the ``predict`` method with a dictionary mapping sequence IDs or
names to amino acid sequences.

.. |Build
Status| image:: https://travis-ci.org/hammerlab/mhctools.svg?branch=master
.. |Coverage
Status| image:: https://coveralls.io/repos/hammerlab/mhctools/badge.svg?branch=master
.. |DOI| image:: https://zenodo.org/badge/18834/hammerlab/mhctools.svg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mhctools-0.4.1.tar.gz (33.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page