sceptr


Namesceptr JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryFast and performant TCR representation model
upload_time2024-10-07 18:45:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords tcr tr t cell transformer bert mlm immunology bioinformatics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

<img src="https://raw.githubusercontent.com/yutanagano/sceptr/main/sceptr.svg" width=700>

[![Latest release](https://img.shields.io/pypi/v/sceptr)](https://pypi.org/p/sceptr)
![Tests](https://github.com/yutanagano/sceptr/actions/workflows/tests.yaml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/sceptr/badge/?version=latest)](https://sceptr.readthedocs.io)
[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/yutanagano/sceptr?tab=MIT-1-ov-file#readme)
[![arXiv](https://img.shields.io/badge/arXiv-arXiv:2406.06397-pink)](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/42/4d/36e35cfb853479d0fa50ab6edf703bf90c8d905642834624b136d3666d04/sceptr-1.1.0.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[![Latest release](https://img.shields.io/pypi/v/sceptr)](https://pypi.org/p/sceptr)\n![Tests](https://github.com/yutanagano/sceptr/actions/workflows/tests.yaml/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/sceptr/badge/?version=latest)](https://sceptr.readthedocs.io)\n[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/yutanagano/sceptr?tab=MIT-1-ov-file#readme)\n[![arXiv](https://img.shields.io/badge/arXiv-arXiv:2406.06397-pink)](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",
    "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": "5b0c728274c37d0297c22557fabafe6fb351a4165afbc117c53ffd1efb4c0a3b",
                "md5": "ef26e9cf553f2d9eb29f8fc9c47f6fa8",
                "sha256": "cbc4c0637506d553f7c5fd4901f4164aa759d50840e743527e05dbc99fab8356"
            },
            "downloads": -1,
            "filename": "sceptr-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef26e9cf553f2d9eb29f8fc9c47f6fa8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10702623,
            "upload_time": "2024-10-07T18:45:09",
            "upload_time_iso_8601": "2024-10-07T18:45:09.011758Z",
            "url": "https://files.pythonhosted.org/packages/5b/0c/728274c37d0297c22557fabafe6fb351a4165afbc117c53ffd1efb4c0a3b/sceptr-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "424d36e35cfb853479d0fa50ab6edf703bf90c8d905642834624b136d3666d04",
                "md5": "22a50c737337efddf22a85474f3767e5",
                "sha256": "ddfb1c5809a52830ebfcce1574a9844e68c40028fea64a050c98ed41617bdce5"
            },
            "downloads": -1,
            "filename": "sceptr-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "22a50c737337efddf22a85474f3767e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 10704473,
            "upload_time": "2024-10-07T18:45:12",
            "upload_time_iso_8601": "2024-10-07T18:45:12.322140Z",
            "url": "https://files.pythonhosted.org/packages/42/4d/36e35cfb853479d0fa50ab6edf703bf90c8d905642834624b136d3666d04/sceptr-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-07 18:45:12",
    "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"
}
        
Elapsed time: 0.61084s