FINE-T
Predict T-cell response for peptide sequences with FINE-T, the fine-tuned transformer model of the paper "Transfer learning for T-cell response prediction" by Josua Stadelmaier, Brandon Malone, and Ralf Eggeling, published in BMC Bioinformatics.
FINE-T is fine-tuned per peptide source and MHC class, and this package provides the models for human peptides of MHC class I and MHC class II. The models only take the peptide sequence as input.
For training the model and for reproducing the domain-aware evaluation of the paper, use the scripts of the repository.
Installation
pip install fine-t-cell
This provides the fine-t-cell command and the finetcell Python package.
For a faster installation, use PyTorch without CUDA support since the FINE-T models are small enough to run on a CPU:
pip install --index-url https://download.pytorch.org/whl/cpu torch numpy
pip install fine-t-cell
Usage
fine-t-cell --peptides peptides.csv --mhc I --source human
The file with the peptides is a CSV file with a peptide column (Epitope Description or
peptide), a CSV file with a single column, or a text file with one peptide per line.
The predictions are written next to it, or to the path given by --predictions_file.
--source currently only accepts human, since the models that are fine-tuned on other
peptide sources are not part of this package.
--mhc is either I or II and selects the model trained specifically for the respective
MHC class. So use as input the peptides of one MHC class at a time.
From Python:
import finetcell
predictions = finetcell.predict(['GILGFVFTL', 'NLVPMVATV'], mhc='I', source='human')
finetcell.predict returns a DataFrame with the peptides and their predictions.
Peptides need to consist of the 20 standard amino acids and they can be at most 28 amino
acids long, which is the longest peptide that the positional encodings of the model support.
Peptides that contain other characters, such as X, and peptides that are longer are
printed with the reason for skipping them, and they are left out of the predictions.
Tests
The tests check that the package reproduces the predictions of the repository scripts. They are part of the source code, so run them from a clone of the repository:
pip install -e .[test]
pytest tests
License
FINE-T is licensed under the GNU Affero General Public License v3.0, see LICENSE.
Citation
Stadelmaier, J., Malone, B. & Eggeling, R. Transfer learning for T-cell response prediction. BMC Bioinformatics 27, 124 (2026). https://link.springer.com/article/10.1186/s12859-026-06492-2
Metadata
Release files for fine-t-cell 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fine_t_cell-1.0.1.tar.gz | 339.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fine_t_cell-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 677.5 kB
Release files / fine_t_cell-1.0.1.tar.gz
| Download URL | fine_t_cell-1.0.1.tar.gz |
|---|---|
| Size | 339.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78c2e63c8f681b0afe0cee710ef2af59cce4ab0053220fc73693911e9e53b1d2
|
|
BLAKE2b-256 checksum How to use checksums |
71cee4a30b4c9bd8c8b9820cf30ecbd2b98d1de9ce166f27a6bed39f605d9146
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / fine_t_cell-1.0.1-py3-none-any.whl
| Download URL | fine_t_cell-1.0.1-py3-none-any.whl |
|---|---|
| Size | 338.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb31edd00543b303278d18aeb0b32ceddfd4c6f0e47970deb3e0f01d5ec85e78
|
|
BLAKE2b-256 checksum How to use checksums |
d5160e6261a063f73d13cf8839aa59b679864bcf24c7d84247c30f598494e918
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|