Downloads · 30 days
1.3K
2% of all-time downloads
neuralbioinfo/PhaStyle-mini
PhaStyle-mini is a machine learning model from neuralbioinfo. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
Model Name: neuralbioinfo/PhaStyle-mini Model Type: Genomic Language Model (ProkBERT-based) Model Description:
Downloads · 30 days
1.3K
2% of all-time downloads
All-time downloads
61.4K
Public
Parameters
20.6M
330 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin82.6 MB · 50%
From the Hugging Face model README
Model Name: neuralbioinfo/PhaStyle-mini
Model Type: Genomic Language Model (ProkBERT-based)
Model Description:
ProkBERT PhaStyle is a fine-tuned genomic language model designed for phage lifestyle prediction. It classifies phages as either virulent or temperate directly from nucleotide sequences. The model is based on ProkBERT architecture and was trained on the BACPHLIP dataset, excluding E. coli sequences By leveraging transfer learning, ProkBERT PhaStyle is optimized for handling fragmented sequences, commonly encountered in metagenomic and metavirome datasets. The model provides a fast, efficient alternative to traditional methods without requiring complex preprocessing pipelines or curated databases.
ProkBERT PhaStyle is designed for phage lifestyle prediction tasks, suitable for:
ProkBERT PhaStyle requires the ProkBERT tokenizer and a custom classification model (BertForBinaryClassificationWithPooling). Below is a high-level overview of how to use the model in inference mode:
aaa
python bin/PhaStyle.py \
--fastain data/EXTREMOPHILE/extremophiles.fasta \
--out output_predictions.tsv \
--ftmodel neuralbioinfo/PhaStyle-mini \
--modelclass BertForBinaryClassificationWithPooling \
--per_device_eval_batch_size 196
Each dataset was processed using 512bp segment lengths to simulate fragmented metagenomic assemblies.
The performance of ProkBERT PhaStyle was evaluated on various datasets, including Escherichia and EXTREMOPHILE phages, using segment lengths of 512bp and 1022bp. The results are summarized below:
| Method | Balanced Accuracy | MCC | Sensitivity | Specificity |
|---|---|---|---|---|
| ProkBERT-mini | 0.91 | 0.83 | 0.94 | 0.89 |
| ProkBERT-mini-long | 0.90 | 0.82 | 0.96 | 0.85 |
| ProkBERT-mini-c | 0.89 | 0.80 | 0.95 | 0.84 |
| DNABERT-2-117M | 0.84 | 0.72 | 0.95 | 0.74 |
| Nucleotide Transformer-50m | 0.85 | 0.72 | 0.92 | 0.78 |
| Nucleotide Transformer-100m | 0.87 | 0.75 | 0.93 | 0.82 |
| Nucleotide Transformer-500m | 0.88 | 0.78 | 0.96 | 0.80 |
| DeePhage | 0.86 | 0.71 | 0.84 | 0.88 |
| PhaTYP | 0.91 | 0.83 | 0.94 | 0.88 |
| Method | Balanced Accuracy | MCC | Sensitivity | Specificity |
|---|---|---|---|---|
| ProkBERT-mini | 0.94 | 0.88 | 0.97 | 0.91 |
| ProkBERT-mini-long | 0.94 | 0.89 | 0.97 | 0.91 |
| ProkBERT-mini-c | 0.93 | 0.87 | 0.97 | 0.89 |
| DNABERT-2-117M | 0.90 | 0.80 | 0.95 | 0.85 |
| Nucleotide Transformer-50m | 0.90 | 0.80 | 0.94 | 0.85 |
| Nucleotide Transformer-100m | 0.92 | 0.83 | 0.94 | 0.89 |
| Nucleotide Transformer-500m | 0.91 | 0.84 | 0.96 | 0.87 |
| DeePhage | 0.91 | 0.82 | 0.94 | 0.88 |
| PhaTYP | 0.92 | 0.84 | 0.96 | 0.87 |
| Method | Balanced Accuracy | MCC | Sensitivity | Specificity |
|---|---|---|---|---|
| ProkBERT-mini | 0.93 | 0.83 | 0.99 | 0.87 |
| ProkBERT-mini-long | 0.93 | 0.82 | 1.00 | 0.86 |
| ProkBERT-mini-c | 0.92 | 0.80 | 0.99 | 0.84 |
| DNABERT-2-117M | 0.89 | 0.74 | 0.99 | 0.79 |
| Nucleotide Transformer-50m | 0.91 | 0.79 | 0.98 | 0.84 |
| Nucleotide Transformer-100m | 0.90 | 0.76 | 0.97 | 0.82 |
| Nucleotide Transformer-500m | 0.91 | 0.78 | 0.99 | 0.82 |
| DeePhage | 0.87 | 0.75 | 0.84 | 0.91 |
| PhaTYP | 0.76 | 0.52 | 0.74 | 0.79 |
| Method | Balanced Accuracy | MCC | Sensitivity | Specificity |
|---|---|---|---|---|
| ProkBERT-mini | 0.96 | 0.91 | 1.00 | 0.93 |
| ProkBERT-mini-long | 0.96 | 0.90 | 1.00 | 0.92 |
| ProkBERT-mini-c | 0.94 | 0.86 | 1.00 | 0.89 |
| DNABERT-2-117M | 0.94 | 0.85 | 0.98 | 0.90 |
| Nucleotide Transformer-50m | 0.93 | 0.83 | 0.99 | 0.87 |
| Nucleotide Transformer-100m | 0.95 | 0.88 | 0.98 | 0.91 |
| Nucleotide Transformer-500m | 0.96 | 0.89 | 1.00 | 0.91 |
| DeePhage | 0.92 | 0.80 | 0.96 | 0.87 |
| PhaTYP | 0.80 | 0.58 | 0.84 | 0.76 |
| Model | Execution Time (seconds) | Inference Speed (MB/sec) |
|---|---|---|
| ProkBERT-mini-long | 132 | 0.52 |
| ProkBERT-mini | 141 | 0.49 |
| ProkBERT-mini-c | 146 | 0.47 |
| DNABERT-2-117M | 284 | 0.23 |
| Nucleotide Transformer-50m | 292 | 0.21 |
| Nucleotide Transformer-100m | 313 | 0.20 |
| Nucleotide Transformer-500m | 500 | 0.15 |
| DeePhage | 159 | 0.43 |
| PhaTYP | 2718 | 0.10 |
| BACPHLIP | 7125 | 0.04 |
The computational performance of ProkBERT PhaStyle was evaluated using 1,000 randomly selected sequences from the BACPHLIP dataset. The evaluation was performed on a consistent hardware setup with NVIDIA Tesla A100 GPUs. The execution times and inference speeds of various models are summarized below:
| Model | Execution Time (seconds) | Inference Speed (MB/sec) |
|---|---|---|
| ProkBERT-mini-long | 132 | 0.52 |
| ProkBERT-mini | 141 | 0.49 |
| ProkBERT-mini-c | 146 | 0.47 |
| DNABERT-2-117M | 248 | 0.25 |
| Nucleotide Transformer-50m | 342 | 0.18 |
| Nucleotide Transformer-500m | 502 | 0.12 |
| DeePhage | 159 | 0.43 |
| PhaTYP | 2,718 | 0.03 |
| BACPHLIP | 7,125 | 0.01 |
ProkBERT PhaStyle is specifically designed for binary classification of phage lifestyles (virulent vs. temperate) and does not handle non-phage sequences. It is recommended to use this model in conjunction with upstream pipelines that identify phage sequences. For large-scale inference, GPU support is strongly advised.
If you use the data in this package, please cite:
@Article{ProkBERT2024,
author = {Ligeti, Balázs and Szepesi-Nagy, István and Bodnár, Babett and Ligeti-Nagy, Noémi and Juhász, János},
journal = {Frontiers in Microbiology},
title = {{ProkBERT} family: genomic language models for microbiome applications},
year = {2024},
volume = {14},
URL={https://www.frontiersin.org/articles/10.3389/fmicb.2023.1331233},
DOI={10.3389/fmicb.2023.1331233},
ISSN={1664-302X}
}