Skip to main content

epitopegen: TCR-based epitope sequence prediction

Project description

EpitopeGen

EpitopeGen is a deep learning model that predicts cognate epitope sequences from T-cell receptor (TCR) sequences. It helps functionally annotate TCRs in single-cell TCR sequencing data by generating potential binding epitopes and identifying phenotype associations.

EpitopeGen

Installation

pip install epitopegen

Quick Start

from epitopegen import EpitopeGenPredictor

# Initialize predictor
predictor = EpitopeGenPredictor()

# Predict epitopes for TCR sequences
tcrs = ["CASIPEGGRETQYF", "CAVRATGTASKLTF"]
results = predictor.predict(tcrs)

Basic Usage

1. Prepare Input Data

Create a CSV file with TCR sequences:

text,label
CASIPEGGRETQYF,ZZZZZ
CAVRATGTASKLTF,ZZZZZ

2. Run Predictions

import pandas as pd
from epitopegen import EpitopeGenPredictor

# Initialize predictor
predictor = EpitopeGenPredictor()

# Read TCR sequences
tcrs = pd.read_csv("input.csv")["text"].tolist()

# Generate predictions
results = predictor.predict(
    tcr_sequences=tcrs,
    output_path="predictions.csv",
    top_k=50  # num of epitopes to generate
)

3. Annotate Phenotypes

from epitopegen import EpitopeAnnotator

# Initialize annotator with reference database
annotator = EpitopeAnnotator("epitopes_db.csv")

# Annotate predictions
results = annotator.annotate(
    predictions_df=results,
    method='substring',
    output_path="annotations.csv"
)

Key Features

  • Generate potential epitope sequences for TCRs
  • Support for multiple model checkpoints
  • Phenotype annotation using reference databases
  • Ensemble predictions for robust results
  • Built-in analysis tools

Resources

Requirements

  • Python ≥ 3.8
  • PyTorch ≥ 1.12
  • transformers ≥ 4.39.0
  • pandas ≥ 1.5.0

Citation

If you use EpitopeGen in your research, please cite:

@article{epitopegen2024,
  title={Generating cognate epitope sequences of T-cell receptors with a generative transformer},
  year={2024}
}

License

MIT License

Support

For questions and issues:

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

epitopegen-0.1.0.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

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

epitopegen-0.1.0-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file epitopegen-0.1.0.tar.gz.

File metadata

  • Download URL: epitopegen-0.1.0.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for epitopegen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97a4ddbdb8b1e2a90155545f2159538acdd0fc5cfd68d31d6af38d278166bcea
MD5 8ab732fae94fd531ddb5b566f9885e26
BLAKE2b-256 f83a1788090a3ee5675e925d90ebcdbfc1ab5e921784b6becb63195a28df5a2b

See more details on using hashes here.

File details

Details for the file epitopegen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: epitopegen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for epitopegen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 499fe9ba8109ce31007d6c843970137f430373abbe156cce2869f31fe97621b0
MD5 b3ef23acbcf8e1d1f1344e43367edeb0
BLAKE2b-256 b9b998c4ee8c6380026e4cbfb12e7b50a96937cb815fa1d95b5af9a7032960e4

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