Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Python interface to IEDB and other immune epitope data

Project description


An important aspect of computational immunology is modeling the properties of [peptides]( (short strings of amino acids). Peptides can arise as substrings [cut]( out of a larger protein, naturally occurring [small proteins](, or be [synthesized](
) for therapeutic purposes.
To make useful predictions (i.e. "which peptides should go in this vaccine?") we need to partition the combinatorial space of peptides into classes such as [epitopes]( vs. non-epitopes (is the peptide presented by [MHC molecules]( or [immunogenic]( vs. non-immunogenic (do [white blood cells]( respond?). One way to capture such distinctions is to collect large volumes of data about peptides and use that data to build statistical models of their immune properties. This library helps you build such models by providing simple Python/NumPy/Pandas interfaces to commonly used immunology and bioinformatics datasets.

**Data Sources**

- `iedb`: [Immune Epitope Database](, large collection of epitope assay results for MHC binding as well as T-cell/B-cell responses
- `tcga`: Variant peptide substrings extracted from [TCGA]( mutations across all cancer types
- `reference`: Peptide substrings from the [human reference protein sequence](
- `imma2`: IMMA2 epitope immunogenic vs. non-immunogenic data set used by Tung et al. for evaluating the [POPISK]( immunogenicity predictor
- `calis`: Two datasets used in Calis et al.'s [Properties of MHC Class I Presented Peptides That Enhance Immunogenicity](
- `hpv`: [Human Papillomavirus T cell Antigen Database](
- `toxin`: Toxic protein sequences from [Animal Toxin Databse](
- `danafarber`: [Dana Farber Repository for Machine Learning in Immunology](
- `tantigen`: [Tumor T-cell Antigen Database](
- `hiv_frahm`: Reactions to HIV epitopes across different ethnicities (from [LANL HIV Databases](
- `cri_tumor_antigens`: Tumor associated peptides from [Cancer Immunity](
- `fritsch_neoepitopes`: Mutated and wildtype tumor epitopes from Fritsch et al. [HLA-binding properties of tumor neoepitopes in humans](


- `bcipep`: [B-cell epitopes](


When a dataset consists only of an unlabeled list of epitopes, then it only needs two functions:
- `load_wuzzle`: Returns set of amino acid strings
- `load_wuzzle_ngrams`: Array whose rows are amino acids transformed into n-gram vector space.

If the dataset contains additional data about the epitopes (such as HLA type u or source protein):
- `load_wuzzle`: Returns data frame with epitope strings and additional properties
- `load_wuzzle_set`: Set of epitope amino acid strings
- `load_wuzzle_ngrams`: Array whose rows are amino acids transformed into n-gram vector space.

If the dataset is labeled (contains positive and negative assay results), then the following functions should be available:
- `load_wuzzle`: Load all available data from the "wuzzle" dataset (filtered by options such as `mhc_class`).
- `load_wuzzle_values`: Group the dataset by epitope string and associate each epitope with the percentage of positive results.
- `load_wuzzle_classes`: Split the epitopes into positive and negative classes, return a set of strings for each.
- `load_wuzzle_ngrams`: Transform the amino acid string representation (or some reduced alphabet) into vectors of n-gram frequencies, return a sklearn-compatible `(samples, labels)` pair of arrays.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
epitopes-0.3.2.tar.gz (27.2 kB) Copy SHA256 hash SHA256 Source None Aug 29, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page