mhctools 1.9.0
pip install mhctools
Released:
Python interface to running command-line and web-based MHC binding predictors
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (http://www.apache.org/licenses/LICENSE-2.0.html)
- Author: Alex Rubinsteyn, Julia Kodysh, Tim O'Donnell
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
mhctools
Python interface to running command-line and web-based MHC binding predictors.
Commandline examples
Prediction for user-supplied peptide sequences
mhctools --sequence SIINFEKL SIINFEKLQ --mhc-predictor netmhc --mhc-alleles A0201
Automatically extract peptides as subsequences of specified length
mhctools --sequence AAAQQQSIINFEKL --extract-subsequences --mhc-peptide-lengths 8-10 --mhc-predictor mhcflurry --mhc-alleles A0201
Python usage
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"
}
binding_predictions = predictor.predict_subsequences(protein_sequences, peptide_lengths=[9])
# flatten binding predictions into a Pandas DataFrame
df = binding_predictions.to_dataframe()
# epitope collection is sorted by percentile rank
# of binding predictions
for binding_prediction in binding_predictions:
if binding_prediction.affinity < 100:
print("Strong binder: %s" % (binding_prediction,))
API
The following MHC binding predictors are available in mhctools
:
MHCflurry
: open source predictor installed by default withmhctools
, requires the user runmhcflurry-downloads fetch
first to download MHCflurry modelsNetMHC3
: requires locally installed version of NetMHC 3.xNetMHC4
: requires locally installed version of NetMHC 4.xNetMHC
: a wrapper function to automatically useNetMHC3
orNetMHC4
depending on what's installed.NetMHCpan
: requires locally installed version of NetMHCpanNetMHCIIpan
: requires locally installed version of NetMHCIIpanNetMHCcons
: requires locally installed version of NetMHCconsIedbMhcClass1
: 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 binding predictor 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.
Additionally there is a module for running the NetChop proteosomal cleavage predictor:
NetChop
: requires locally installed version of NetChop-3.1
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (http://www.apache.org/licenses/LICENSE-2.0.html)
- Author: Alex Rubinsteyn, Julia Kodysh, Tim O'Donnell
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mhctools-1.9.0.tar.gz
.
File metadata
- Download URL: mhctools-1.9.0.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 543931571dc5784faa9769acec3ef00054b42ec568dfdb3e3ba87660f7988c0e |
|
MD5 | 469c55a74d5c72ae0a47ba3a5319f83c |
|
BLAKE2b-256 | 0a0e195899d431d381b8b756f36e1dd66d236132488bd0f1ba47dfd3e6bb5548 |
File details
Details for the file mhctools-1.9.0-py3-none-any.whl
.
File metadata
- Download URL: mhctools-1.9.0-py3-none-any.whl
- Upload date:
- Size: 54.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4980de86060c5d4112b5595aab742f315b0b9da841b3db103608e8dde2f564a3 |
|
MD5 | 0013a84cd768d57477b5a7f4c3312c80 |
|
BLAKE2b-256 | 95b5009ee1e1ad60ca18816b933321b380a6b43e2577d679329655ee3c80e89e |