Skip to main content

Fast and performant TCR representation model

Project description

Latest release Tests Documentation Status License arXiv

Check out the documentation page.


SCEPTR (Simple Contrastive Embedding of the Primary sequence of T cell Receptors) is a small, fast, and accurate TCR representation model that can be used for alignment-free TCR analysis, including for TCR-pMHC interaction prediction and TCR clustering (metaclonotype discovery). Our preprint demonstrates that SCEPTR can be used for few-shot TCR specificity prediction with improved accuracy over previous methods.

SCEPTR is a BERT-like transformer-based neural network implemented in Pytorch. With the default model providing best-in-class performance with only 153,108 parameters (typical protein language models have tens or hundreds of millions), SCEPTR runs fast- even on a CPU! And if your computer does have a CUDA-enabled GPU, the sceptr package will automatically detect and use it, giving you blazingly fast performance without the hassle.

sceptr's API exposes three intuitive functions: calc_vector_representations, calc_cdist_matrix, and calc_pdist_vector- and it's all you need to make full use of the SCEPTR models. What's even better is that they are fully compliant with pyrepseq's tcr_metric API, so sceptr will fit snugly into the rest of your repertoire analysis workflow.

Installation

pip install sceptr

Citing SCEPTR

Please cite our preprint.

BibTex

@misc{nagano2024contrastive,
      title={Contrastive learning of T cell receptor representations}, 
      author={Yuta Nagano and Andrew Pyo and Martina Milighetti and James Henderson and John Shawe-Taylor and Benny Chain and Andreas Tiffeau-Mayer},
      year={2024},
      eprint={2406.06397},
      archivePrefix={arXiv},
      primaryClass={q-bio.BM}
}

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

sceptr-1.1.0.tar.gz (10.7 MB view details)

Uploaded Source

Built Distribution

sceptr-1.1.0-py3-none-any.whl (10.7 MB view details)

Uploaded Python 3

File details

Details for the file sceptr-1.1.0.tar.gz.

File metadata

  • Download URL: sceptr-1.1.0.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sceptr-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ddfb1c5809a52830ebfcce1574a9844e68c40028fea64a050c98ed41617bdce5
MD5 22a50c737337efddf22a85474f3767e5
BLAKE2b-256 424d36e35cfb853479d0fa50ab6edf703bf90c8d905642834624b136d3666d04

See more details on using hashes here.

File details

Details for the file sceptr-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sceptr-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sceptr-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbc4c0637506d553f7c5fd4901f4164aa759d50840e743527e05dbc99fab8356
MD5 ef26e9cf553f2d9eb29f8fc9c47f6fa8
BLAKE2b-256 5b0c728274c37d0297c22557fabafe6fb351a4165afbc117c53ffd1efb4c0a3b

See more details on using hashes here.

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