|
Download README.md from viro-bert/Viro-BERT: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/viro-bert/Viro-BERT/resolve/main/README.md
- Command line
-
hf download hf://viro-bert/Viro-BERT/README.md
-
curl -L -o README.md https://huggingface.co/viro-bert/Viro-BERT/resolve/main/README.md
1.79 kB
| license: mit | |
| language: | |
| - en | |
| tags: | |
| - biology | |
| - genomics | |
| - viral-classification | |
| - transformer | |
| - distilbert | |
| # Viro-BERT | |
| Whole-genome Transformer framework for viral pathogen classification across 14 viral classes using Chunk-and-Vote Late Fusion Consensus. | |
| --- | |
| ### Requirements | |
| ```bash | |
| pip install torch transformers biopython | |
| ``` | |
| Tested on Python 3.8+ and PyTorch 1.13+ (supports CPU and CUDA). | |
| --- | |
| ### Files in Repository | |
| * `sota_chunk_model.pth` — Trained PyTorch model weights (DistilBERT backbone, 6 layers, 12 heads, hidden dim 768). | |
| * `config.json` — 130-token 3-mer vocabulary, hyperparameters, and 14 target class mappings. | |
| * `predict.py` — Standalone inference script for FASTA sequence classification. | |
| --- | |
| ### Command-Line Usage (Python) | |
| Classify viral sequences from a FASTA file: | |
| ```bash | |
| python predict.py --fasta sample.fasta | |
| ``` | |
| Optional arguments: | |
| ```bash | |
| python predict.py --fasta sample.fasta --weights sota_chunk_model.pth --config config.json --top_k 3 --cpu | |
| ``` | |
| --- | |
| ### Execution via R | |
| Run directly from an R environment via system command: | |
| ```R | |
| system("python predict.py --fasta sample.fasta") | |
| ``` | |
| Or programmatically via the `reticulate` interface: | |
| ```R | |
| library(reticulate) | |
| py_run_file("predict.py") | |
| ``` | |
| --- | |
| ### Target Viral Classes (14) | |
| * Dengue Virus (`Dengue`) | |
| * Enterovirus A (`EnteroA`) | |
| * Enterovirus B (`EnteroB`) | |
| * Hepatitis B Virus (`HBV`) | |
| * Hepatitis C Virus (`HCV`) | |
| * Human Papillomavirus (`HPV`) | |
| * Human Alphaherpesvirus 1 (`HSV-1`) | |
| * Influenza A Virus (`IAV`) | |
| * Influenza B Virus (`IBV`) | |
| * Influenza C Virus (`ICV`) | |
| * Monkeypox Virus (`MPV`) | |
| * Severe Fever with Thrombocytopenia Syndrome Virus (`SFTS`) | |
| * West Nile Virus (`WNV`) | |
| * Zika Virus (`Zika`) | |
| --- | |
| ### License | |
| Open access under the MIT License. | |
| ``` | |
| ``` |