Standalone Package
Run HAIRpred2 locally on your own machine, without internet access.
HAIRpred2 Standalone (ZIP)
Complete package with Python script, pre-trained model, and README. Runs locally without internet access.
Pre-Trained Model Only
Download just the Random Forest model file if you already have the script installed.
Training & Test Data
Download the dataset used for model training and evaluation.
Install via pip
Quickly install HAIRpred2 directly from PyPI using pip.
pip install hairpred2
View on PyPI
Installation
Install required Python packages and system dependencies.
# Install all required packages
pip install numpy pandas joblib gemmi biopython scipy
# Linux / Ubuntu
sudo apt install dssp
# Conda (any platform — recommended)
conda install -c salilab dssp
# macOS (Homebrew)
brew install dssp
The model file best_model_random_forest.pkl must be placed in the same folder as hairpred2.py. It is loaded automatically — no argument needed.
Usage
Command-line examples for common use cases.
# Basic — single chain, default threshold 0.5
python hairpred2.py -i antigen.pdb -c A
# Custom output prefix
python hairpred2.py -i antigen.pdb -c A -o my_results
# Multiple antigen chains
python hairpred2.py -i antigen.pdb -c A,B
# Filter buried residues (recommended)
python hairpred2.py -i antigen.pdb -c A --min-rsa 0.05
# Custom probability threshold
python hairpred2.py -i antigen.pdb -c A -t 0.4
python hairpred2.py --help
-i / --input Input antigen PDB file (required)
-c / --chain Chain ID (e.g. A) or A,B (required)
-o / --output Output file prefix (default: hairpred2_results)
-t / --threshold Probability threshold (default: 0.5)
--min-rsa Minimum RSA filter (default: none)
Example Data
Test files to verify your installation.
Example PDB File
Antigen PDB file (8tui_antigen_A.pdb) for testing. Use with Chain ID A.
Training & Test Dataset
277 human Ag-Ab complexes (221 train + 56 test) with PDB IDs and epitope labels.
Output Files Reference
Description of all 5 output files generated per prediction job.
License
HAIRpred2 is freely available for academic and non-commercial use. For commercial licensing or collaboration enquiries, please contact us.