Skip to main content

creates, visualizes, and exports peptide to MHC binding energy covariance (pmbec) matrices

Project description

pmbec (Peptide to MHC binding energy covariance matrices)

Author: Jacob Doering-Powell

generate pmbec matrices from peptide to mhc combinatorial binding assay data that can be used as scoring matrices in the training of peptide to MHC binding algorithms. The matrices can also be used to quantify how different experimental conditions contribute to overall binding from different residues.

Requirements:

  • Python 3.7+

Installation:

Download through pypi pip install pmbec

Usage:

  • example where raw data file has alleles treated with 2ME. 2ME keeps peptides that have cysteines within them in a reduced form, therefore the filtering function consolidates the impact of 2ME on cysteine residues. This shows how experimental data can be captured in a PMBEC matrix, and the general flow of how the package should be used. Order of calling should be:
  1. get_raw_data()
  2. filter_raw_data()
  3. calculate_energy_contribution()
  4. covariance()
  5. cluster_matrix() - clusters the covariance matrix to see pockets of similar/dissimilar residues
from pmbec.pmbec_generator import pmbec_generator

pm = pmbec_generator(job_id='pmbec_matrix', threshold=.05)
raw_data = pm.get_raw_data("raw_data_file",
            'Residue',
            'Position',
            nrows=49,
            sep=',')
pm.filter_raw_data(raw_data,
                    consolidate=True,
                    consolidate_on='2ME',
                    positions={2,9},
                    residues_to_consolidate=set(['C']),
                    skip_alleles='2ME')
energy_contribution = pm.calculate_energy_contribution()
cov_matrix = pm.covariance()
clustered = pm.cluster_matrix(cov_matrix)
pm.write_excel(clustered)

Input:

The initial input starts with loading binding data from a combinatorial binding assay between peptides and different alleles of MHC molecules. The data can be in a comma, tab, or space seperated file, but it must be specified with the sep parameter. The function also assumes that only binding data comes after the position column in the file, so if your raw data file is ordered differently, it is recommended to order the columns as such : ['column 1' , column 2', ... 'Residue column', 'Position column', all alleles binding data].

Output:

calling covariance, and cluster_matrix, will return pandas dataframes. Any dataframe can be written with the cells colored according to the threshold set in construction as an excel file with the write_excel function.

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

pmbec-0.0.2.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pmbec-0.0.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file pmbec-0.0.2.tar.gz.

File metadata

  • Download URL: pmbec-0.0.2.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for pmbec-0.0.2.tar.gz
Algorithm Hash digest
SHA256 381f763d16d4fa908634677d2aeb54a611b854ec33cd8d618f3223a7a21882ac
MD5 8f429a6675ed9105e2dbfa2924064ee3
BLAKE2b-256 50d69a17f4758ead27ea3d80fcbbc48bf0647c7176712ed603e921688d569aff

See more details on using hashes here.

File details

Details for the file pmbec-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pmbec-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for pmbec-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1bb1a4f8f69a19cf07f469bbf4c3a96fca95a2f5ee2563751f3223d122531da9
MD5 1357829373dae28e46dd49901eae5204
BLAKE2b-256 138286ba45a4aeefd5f6ce4bf5051e7400decfa8ff78e70f2cc63cd71deeb488

See more details on using hashes here.

Supported by

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