Downloads · 30 days
0
jackkuo/BCE-Vir-Prediction_model
BCE-Vir-Prediction_model is a machine learning model from jackkuo. 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 mit.
A virus epitope prediction tool based on ESM (Evolutionary Scale Modeling). This tool uses a pre-trained ESM classification model to perform sliding window predictions on protein sequences, identifying potential antig…
Downloads · 30 days
0
Access
Public
Updated Jan 12, 2026
Repo size
593 MB
Likes
0
Public
Click a slice to open those files.
.safetensors593 MB · 100%
From the Hugging Face model README
A virus epitope prediction tool based on ESM (Evolutionary Scale Modeling). This tool uses a pre-trained ESM classification model to perform sliding window predictions on protein sequences, identifying potential antigen epitopes and functional domains.
bcepre_predict_logits.py): Uses a pre-trained ESM classification model to split protein sequences with sliding windows, performs classification predictions on each subsequence (e.g., whether it is an antigen epitope, functional domain, etc.), and saves prediction results along with corresponding logits values.bcepre_predict_softmax.py): Converts sliding window prediction results into probability values aggregated by amino acid position, outputting a results table containing amino acid types, epitope probabilities, and coverage counts.The pre-trained model can be downloaded from Hugging Face:
Model Repository: jackkuo/BCE-Vir-Prediction_model
Code Repository: JackKuo666/BCE-Vir-Prediction
This folder is used to store the trained ESM model files.
Use the huggingface_hub library to download the model:
pip install huggingface_hub
Then run the following Python code:
from huggingface_hub import snapshot_download
# Download the model to the current folder
snapshot_download(
repo_id="jackkuo/BCE-Vir-Prediction_model",
local_dir="./",
local_dir_use_symlinks=False
)
Or use huggingface-cli in the command line:
huggingface-cli download jackkuo/BCE-Vir-Prediction_model --local-dir ./ --local-dir-use-symlinks False
If Git LFS is installed, you can clone directly:
git lfs install
git clone https://huggingface.co/jackkuo/BCE-Vir-Prediction_model .
Visit the model page: https://huggingface.co/jackkuo/BCE-Vir-Prediction_model
Select the required files from the file list to download and save them to this folder.
After downloading, this folder should contain the following files:
config.json - Model configuration filemodel.safetensors - Model weights file (in safetensors format)tokenizer_config.json - Tokenizer configuration filevocab.txt - Vocabulary filespecial_tokens_map.json - Special tokens mapping fileFirst, download the pre-trained model to the trained_esm_model folder.
Place the protein sequence file (FASTA format) to be predicted in the example_data folder, or modify the input file path in the script.
Run the bcepre_predict_logits.py script for epitope prediction:
python bcepre_predict_logits.py
This script will:
sequence: Subsequencewindow_size: Window sizeprediction: Predicted classlogit_0, logit_1, ...: Logits values for each classOutput files are saved in the predictions/ folder by default.
Run the bcepre_predict_softmax.py script to convert prediction results into aggregated probabilities by amino acid position:
python bcepre_predict_softmax.py
This script will:
bcepre_predict_logits.pyposition: Amino acid position (starting from 1)amino_acid: Amino acid typeprobability: Epitope probability at this position (average of all window predictions covering this position)coverage: Number of windows covering this positionThis project is licensed under the MIT License. See the LICENSE file for details.
If you use this tool for research, please cite the relevant models and code repositories.
For questions or suggestions, please contact us through GitHub Issues.