<div align="center">
<img src="https://raw.githubusercontent.com/yutanagano/sceptr/main/sceptr.svg" width=700>
[](https://pypi.org/p/sceptr)

[](https://sceptr.readthedocs.io)
[](https://github.com/yutanagano/sceptr?tab=MIT-1-ov-file#readme)
[](https://arxiv.org/abs/2406.06397v1)
### Check out the [documentation page](https://sceptr.readthedocs.io).
</div>
---
**SCEPTR** (**S**imple **C**ontrastive **E**mbedding of the **P**rimary sequence of **T** cell **R**eceptors) 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](https://arxiv.org/abs/2406.06397) 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](https://pytorch.org).
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](https://en.wikipedia.org/wiki/CUDA), 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](https://pyrepseq.readthedocs.io)'s [tcr_metric](https://pyrepseq.readthedocs.io/en/latest/api.html#pyrepseq.metric.tcr_metric.TcrMetric) API, so sceptr will fit snugly into the rest of your repertoire analysis workflow.
## Installation
```bash
pip install sceptr
```
## Citing SCEPTR
Please cite our [preprint](https://arxiv.org/abs/2406.06397).
### BibTex
```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}
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sceptr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Yuta Nagano <yutanagano51@proton.me>",
"keywords": "TCR, TR, T cell, transformer, bert, MLM, immunology, bioinformatics",
"author": null,
"author_email": "Yuta Nagano <yutanagano51@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/6e/15/b4db3fa054945a31ab9ba99b4672ced94cc9387235284d31dcd96ce77822/sceptr-1.1.0.post1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n<img src=\"https://raw.githubusercontent.com/yutanagano/sceptr/main/sceptr.svg\" width=700>\n\n[](https://pypi.org/p/sceptr)\n\n[](https://sceptr.readthedocs.io)\n[](https://github.com/yutanagano/sceptr?tab=MIT-1-ov-file#readme)\n[](https://arxiv.org/abs/2406.06397v1)\n\n### Check out the [documentation page](https://sceptr.readthedocs.io).\n\n</div>\n\n---\n\n**SCEPTR** (**S**imple **C**ontrastive **E**mbedding of the **P**rimary sequence of **T** cell **R**eceptors) 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).\nOur [preprint](https://arxiv.org/abs/2406.06397) demonstrates that SCEPTR can be used for few-shot TCR specificity prediction with improved accuracy over previous methods.\n\nSCEPTR is a BERT-like transformer-based neural network implemented in [Pytorch](https://pytorch.org).\nWith 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!\nAnd if your computer does have a [CUDA-enabled GPU](https://en.wikipedia.org/wiki/CUDA), the sceptr package will automatically detect and use it, giving you blazingly fast performance without the hassle.\n\nsceptr'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.\nWhat's even better is that they are fully compliant with [pyrepseq](https://pyrepseq.readthedocs.io)'s [tcr_metric](https://pyrepseq.readthedocs.io/en/latest/api.html#pyrepseq.metric.tcr_metric.TcrMetric) API, so sceptr will fit snugly into the rest of your repertoire analysis workflow.\n\n## Installation\n\n```bash\npip install sceptr\n```\n\n## Citing SCEPTR\nPlease cite our [preprint](https://arxiv.org/abs/2406.06397).\n\n### BibTex\n```bibtex\n@misc{nagano2024contrastive,\n title={Contrastive learning of T cell receptor representations}, \n author={Yuta Nagano and Andrew Pyo and Martina Milighetti and James Henderson and John Shawe-Taylor and Benny Chain and Andreas Tiffeau-Mayer},\n year={2024},\n eprint={2406.06397},\n archivePrefix={arXiv},\n primaryClass={q-bio.BM}\n}\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Fast and performant TCR representation model",
"version": "1.1.0.post1",
"project_urls": {
"Documentation": "https://sceptr.readthedocs.io",
"Homepage": "https://sceptr.readthedocs.io",
"Issues": "https://github.com/yutanagano/sceptr/issues",
"Repository": "https://github.com/yutanagano/sceptr"
},
"split_keywords": [
"tcr",
" tr",
" t cell",
" transformer",
" bert",
" mlm",
" immunology",
" bioinformatics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ebedd88a1b4fe801b3131039c1b9af69c12c5878868a6efe8a6a391dbd0f5e2",
"md5": "37777cb1567e3c947633057f17899d97",
"sha256": "b27e2a8a5027b778a39bd066807dbc72a5d9be53e8d19d3c5ab876552eab5b78"
},
"downloads": -1,
"filename": "sceptr-1.1.0.post1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "37777cb1567e3c947633057f17899d97",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 10702698,
"upload_time": "2024-12-05T23:17:51",
"upload_time_iso_8601": "2024-12-05T23:17:51.780231Z",
"url": "https://files.pythonhosted.org/packages/9e/be/dd88a1b4fe801b3131039c1b9af69c12c5878868a6efe8a6a391dbd0f5e2/sceptr-1.1.0.post1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6e15b4db3fa054945a31ab9ba99b4672ced94cc9387235284d31dcd96ce77822",
"md5": "80242ae53d1b68a18d451b8ebb19aadc",
"sha256": "9adf9930345e9a580d986f8d3e801aadc85ca95f2ca31406920a14d7f2741b67"
},
"downloads": -1,
"filename": "sceptr-1.1.0.post1.tar.gz",
"has_sig": false,
"md5_digest": "80242ae53d1b68a18d451b8ebb19aadc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 10704588,
"upload_time": "2024-12-05T23:17:54",
"upload_time_iso_8601": "2024-12-05T23:17:54.775864Z",
"url": "https://files.pythonhosted.org/packages/6e/15/b4db3fa054945a31ab9ba99b4672ced94cc9387235284d31dcd96ce77822/sceptr-1.1.0.post1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-05 23:17:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yutanagano",
"github_project": "sceptr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "sceptr"
}