Blog
How to Predict B-Cell Epitopes with BepiPred and ABCpred: A Step-by-Step Guide
- July 28, 2026
- Posted by: Ragini Mishra
- Category: Bioinformatics

To predict B-cell epitopes, submit a clean single-chain protein FASTA to BepiPred on the IEDB Analysis Resource and to ABCpred, then read the per-residue score against the server threshold. Convert scored residues into peptides of 8 to 20 amino acids, run the same antigen on both servers, and keep only the consensus stretches.
That is the whole procedure in one paragraph. The rest of this guide is the part that actually trips students up: preparing the sequence so the servers accept it, reading a column of numbers correctly, and deciding which stretches are worth carrying into the next stage of a reverse vaccinology project.
On this page
- What does a linear B-cell epitope predictor actually return?
- How do you prepare the antigen sequence before predicting?
- How do you run BepiPred on the IEDB Analysis Resource?
- How do you run ABCpred and read its output?
- How do you turn per-residue scores into candidate peptides?
- Which server should you use: BepiPred 2.0, BepiPred 3.0 or ABCpred?
- How do you build a consensus across two servers?
- Troubleshooting: the errors students actually hit
- What comes after you have candidate epitopes?
- Frequently asked questions
What does a linear B-cell epitope predictor actually return?
It returns a score for every residue in your sequence, not a list of epitopes. This is the single biggest source of confusion. You paste 222 residues, you get 222 rows back, and each row carries a position, an amino acid, a numeric score and usually a flag showing whether that residue passed the threshold. Nothing in that output is a peptide yet. Building peptides is your job, and it is described in the section on converting scores below.
The second thing to understand is what the score means. BepiPred 2.0 is a Random Forest regression model trained on antibody-bound residues taken from antigen-antibody crystal structures, so its score is an estimate of how likely a residue is to sit in an antibody contact surface. ABCpred is a recurrent neural network trained on known continuous epitope peptides, so it scores fixed-length windows rather than single residues. Two different training targets, two different output shapes, and that is exactly why running both is worth the extra ten minutes.
How do you prepare the antigen sequence before predicting?
Four checks, in this order, before you paste anything into a server.
- One protein, one chain, plain FASTA. A single header line beginning with
>followed by the sequence. Multi-chain complexes and multi-record files are the most common reason a job fails silently. - Strip non-standard characters. Remove every
X,B,Z,U, asterisk and gap dash. Predictors are trained on the 20 standard amino acids, and anXin the middle of your sequence will either be rejected outright or silently distort the scores around it. If your sequence came from an automated assembly, check for a run ofXcharacters at the start. - Remove the signal peptide and the transmembrane and cytoplasmic tails. Antibodies see the exposed ectodomain. Keeping a 22-residue transmembrane helix in the input adds a hydrophobic stretch that no antibody will ever reach.
- Check the length against the server limit. This matters more than students expect, and it is covered in the next section.
For a worked example, take the SARS coronavirus spike glycoprotein, UniProt accession P59594. The full chain is 1,255 residues. UniProt annotates the receptor-binding domain as residues 306 to 527, which is 222 residues. Predicting on that domain rather than on the whole spike is the difference between a job that runs and a job that gets refused, and it also concentrates the prediction on the region a neutralising antibody is most likely to engage.
How do you run BepiPred on the IEDB Analysis Resource?
Go to the IEDB B-cell epitope prediction tool. The method dropdown offers seven options: Bepipred Linear Epitope Prediction 2.0, the original Bepipred Linear Epitope Prediction, Chou & Fasman Beta-Turn Prediction, Emini Surface Accessibility Prediction, Karplus & Schulz Flexibility Prediction, Kolaskar & Tongaonkar Antigenicity, and Parker Hydrophilicity Prediction. Select Bepipred Linear Epitope Prediction 2.0. The five propensity-scale methods below it date from the 1980s and are useful as supporting evidence, not as your primary call.
You can submit either a Swiss-Prot identifier or a raw sequence. Read the stated input limits carefully, because they differ by method: the page specifies 50,000 residues maximum overall, but only 250 residues for Bepipred 2.0. This is why the domain-level input from the previous section matters.
The output is a table with one row per residue: position, residue, score, and an assignment column. The default threshold is 0.5, and the output page carries a threshold slider so you can raise or lower it after seeing the score distribution. Residues at or above the threshold are marked as epitope residues.
If you want the current generation of the method, BepiPred 3.0 runs on the DTU Health Tech server. It replaces the hand-built input features with embeddings from the ESM-2 protein language model, representing each residue as a vector of length 1,280. Its default classification threshold is 0.1512, which looks alarming next to BepiPred 2.0’s 0.5 until you realise the two models put their scores on completely different scales. Never carry a threshold from one server to another. BepiPred 3.0 also lets you ask for the top N residue candidates per sequence instead of applying a fixed cut-off, which is often the more practical option when you want a fixed-size shortlist.
How do you run ABCpred and read its output?
Open the ABCpred server and paste the same cleaned sequence. Three settings control the result:
- Window length. The server documentation states that users can select a window length of 10, 12, 14, 16 or 20 as the predicted epitope length. Use 16 for your first pass. In the original paper the best-performing network was the one trained on 16-residue windows.
- Threshold. The selector spans 0.1 to 1. Read the value the form is actually set to rather than assuming a default, and record it in your notes, because a result table is meaningless without the threshold that produced it.
- Overlapping filter. Set this to ON for a first pass. With it OFF you will get a long list of near-identical peptides shifted by one residue each, which looks like many hits but is really one region reported many times.
ABCpred returns a ranked table of fixed-length peptides with a start position and a score, sorted best first. Unlike BepiPred, this output already is a peptide list, which is why ABCpred is the faster of the two to interpret and the easier one to over-trust.
Keep the reported performance in view while you read that ranking. The ABCpred documentation states the server can “predict epitopes with 65.93% accuracy using recurrent neural network”. In the source paper that figure comes from five-fold cross-validation on a balanced set of 700 non-redundant B-cell epitopes from the Bcipep database and 700 randomly selected non-epitope peptides from Swiss-Prot, with sensitivity 67.14%, specificity 64.71% and positive predictive value 65.61%. A method that is right roughly two times in three is a shortlisting tool, not a verdict.
How do you turn per-residue scores into candidate peptides?
For BepiPred output, apply four rules:
- Find contiguous runs of residues that pass the threshold. Ignore isolated single residues above the cut-off; a real linear epitope is a stretch, not a spike.
- Apply a minimum length of 8 residues. Shorter runs rarely survive experimental validation as standalone peptides.
- Apply a maximum length of about 20 residues. If a run is 60 residues long, that is a signal your threshold is too permissive, not that you have found a 60-residue epitope. Raise the threshold and re-read the runs.
- Score each peptide by the mean of its residue scores and rank on that, then break ties using the peak residue score inside the run.
Record the position range for every peptide you keep, using the numbering of the sequence you submitted. If you submitted a domain rather than the full chain, add the domain offset back so your positions map onto the parent accession. Losing track of the offset is the quiet error that ruins a whole downstream analysis, and it is the reason a candidate peptide can fail to appear anywhere near where the structure says it should.
Want the guided, hands-on version?
Our live Molecular Modeling & MD Simulations cohort bootcamp takes you from zero to running real docking and MD workflows, with a portfolio project for your grad-school applications.
Which server should you use: BepiPred 2.0, BepiPred 3.0 or ABCpred?
Use more than one. Here is how the three compare on the properties that change your workflow.
| Property | BepiPred 2.0 (via IEDB) | BepiPred 3.0 (DTU) | ABCpred |
|---|---|---|---|
| Method | Random Forest regression | ESM-2 language model embeddings, 1,280 values per residue | Recurrent (Jordan) neural network |
| Training data | Antibody-bound residues from antigen-antibody crystal structures: 3,542 epitope residues against 36,785 non-epitope residues | Structure-derived epitope annotations, ESM-2 encoded | 700 epitopes from Bcipep plus 700 random Swiss-Prot non-epitopes |
| Output shape | Per-residue score | Per-residue score, plus an option to return the top N residues | Ranked fixed-length peptides |
| Default threshold | 0.5 | 0.1512 | User-set, selector spans 0.1 to 1 |
| Input limit | 250 residues on the IEDB page | Longer sequences accepted; check the server page before submitting | No published maximum |
| Reported performance | Average AUC 0.596 on five structures published after 2014 | AUC 0.771 on a 15-antigen external test set, against 0.668 for BepiPred 2.0 on the same set | 65.93% accuracy by five-fold cross-validation |
| Best used for | A structure-informed per-residue baseline inside the IEDB ecosystem | The strongest current sequence-only prediction | A fast ranked peptide shortlist to cross-check the others |
Those AUC numbers deserve a sentence of interpretation. An AUC of 0.596 is only modestly better than a coin flip, which is an honest reflection of how hard sequence-only B-cell epitope prediction is. The jump to 0.771 with BepiPred 3.0 on an external set is a genuine improvement and the main reason to prefer the newer model when your sequence length allows it.
How do you build a consensus across two servers?
Run the identical cleaned sequence through both servers, then intersect by position, not by peptide string. Peptides from BepiPred are variable length and peptides from ABCpred are fixed length, so exact string matching will find almost nothing while the underlying regions agree perfectly well.
The procedure, using the P59594 receptor-binding domain (residues 306 to 527) as the example:
- Submit residues 306 to 527 to IEDB with Bepipred 2.0 selected. Extract the contiguous runs at threshold 0.5, applying the 8 to 20 residue length rules.
- Submit the same 222 residues to ABCpred with window length 16 and the overlapping filter ON. Record the top ranked peptides with their start positions.
- Convert both result sets to position ranges in the same numbering.
- Keep a region only where a BepiPred run and an ABCpred peptide overlap by at least 6 residues. Six is a working cut-off, not a published standard; state whichever value you use in your methods section.
- Rank the surviving consensus regions by the BepiPred mean score, and check each one against the Emini Surface Accessibility output from IEDB as a third, independent line of evidence.
Expect the consensus list to be short. If two servers agree on eight regions out of an antigen this size, be suspicious of your thresholds rather than pleased with your yield. Three to five surviving regions from a domain of this size is a normal, healthy result.
Troubleshooting: the errors students actually hit
| What you see | Why it happens | Fix |
|---|---|---|
| The job is refused because the sequence is too long | IEDB allows 50,000 residues overall but only 250 residues for Bepipred 2.0 | Submit a single annotated domain instead of the full chain, and record the offset so you can map positions back |
| Invalid or non-standard residue error | An X, B, Z, U, asterisk or gap dash in the input | Remove them before submitting. If the ambiguous residues sit inside a region you care about, go back to the source record rather than substituting anything |
| Sequence too short, or a suspiciously empty result | The window cannot be placed. ABCpred needs at least as many residues as the window length you selected | Use a shorter window, or submit a longer construct that includes flanking residues |
| Almost every residue passes the threshold | The default cut-off is a general-purpose value, not one tuned to your antigen. Some proteins simply score high across the board | Raise the threshold on the output page until the passing fraction is a plausible minority, then re-extract the runs. Rank by score rather than treating the binary call as final |
| ABCpred returns many near-identical peptides one residue apart | The overlapping filter is OFF | Set the overlapping filter to ON, or collapse the overlapping set to a single region yourself and keep the highest-scoring member |
| The job never returns a result | Academic servers go down, and long inputs queue behind other users | Re-submit a shorter sequence first to confirm the server is alive. If BepiPred 2.0 on IEDB is unavailable, run BepiPred 3.0 on the DTU server and note the threshold change in your methods |
| Predicted positions do not match the structure | You predicted on a domain but reported positions in domain numbering | Add the domain start offset back to every position before comparing against PDB or UniProt annotations |
What comes after you have candidate epitopes?
A consensus peptide list is a starting point, not a result. The usual next steps are to screen the surviving peptides for predicted antigenicity and for allergenicity, to check that a candidate is conserved across the strains you care about, and to move from linear prediction to conformational epitope prediction on a structure or a reliable model. Tools such as VaxiJen and AllerTOP are the common choices for the antigenicity and allergenicity screens, and C-ImmSim is often used for immune simulation, though server availability for all three varies, so verify each one is responding before you build a deadline around it.
The step most often skipped is the honest one: check whether the epitopes you predicted have already been reported experimentally. Search the IEDB database itself for your antigen before claiming novelty. Finding that your top candidate is already a documented epitope is a validation of your pipeline, not a disappointment.
If you are working through this as part of a structured plan, the immunoinformatics pillar guide sets out where epitope prediction sits in a full reverse vaccinology project, and the computational biology skills roadmap shows which skills to build before and after this one.
This walkthrough reflects the way the StemSkills Lab team runs the step in teaching projects, drawing on more than ten years across sequence and structural bioinformatics, drug discovery and design, and multiscale molecular modeling.
Frequently asked questions
Is BepiPred or ABCpred more accurate for B-cell epitope prediction?
They are not directly comparable, because they were benchmarked differently: BepiPred 2.0 reports an average AUC of 0.596 on five post-2014 structures, BepiPred 3.0 reports AUC 0.771 on a 15-antigen external test set, and ABCpred reports 65.93% accuracy by five-fold cross-validation on a balanced peptide set. BepiPred 3.0 is the strongest current sequence-only predictor. Use ABCpred alongside it as an independent cross-check rather than as a competitor.
What threshold should I use for BepiPred?
Start at the server default, 0.5 for BepiPred 2.0 and 0.1512 for BepiPred 3.0, then adjust based on what fraction of residues passes. The thresholds are not interchangeable between versions because the two models produce scores on different scales. Whichever value you settle on, report it: a peptide list without its threshold cannot be reproduced.
Can I predict B-cell epitopes without a protein structure?
Yes for linear epitopes, which is what BepiPred and ABCpred predict from sequence alone. Conformational epitopes, formed by residues that are far apart in sequence but close in the folded protein, need a structure or a good model. Most epitopes on native antigens are conformational, so a sequence-only result should always be described as a linear epitope prediction.
How long should a predicted B-cell epitope be?
For downstream peptide work, 8 to 20 residues is the practical range, and ABCpred restricts you to fixed windows of 10, 12, 14, 16 or 20. A predicted run much longer than 20 residues usually means the threshold is too permissive rather than that a single long epitope exists.
Why do my predicted epitopes differ every time I change the input?
Because these methods score residues in sequence context. Trimming a signal peptide, submitting a domain instead of a full chain, or leaving an X in the sequence all shift the scores around the edited region. Fix the input once, record exactly what you submitted, and run every server on that identical sequence.
Want the guided, hands-on version?
Our live Molecular Modeling & MD Simulations cohort bootcamp takes you from zero to running real docking and MD workflows, with a portfolio project for your grad-school applications.
Primary sources
- Jespersen MC, Peters B, Nielsen M, Marcatili P. BepiPred-2.0: improving sequence-based B-cell epitope prediction using conformational epitopes. Nucleic Acids Research. 2017;45(W1):W24-W29. Full text
- Clifford JN, Høie MH, Deleuran S, Peters B, Nielsen M, Marcatili P. BepiPred-3.0: improved B-cell epitope prediction using protein language models. Protein Science. 2022;31(12):e4497. Full text
- Saha S, Raghava GPS. Prediction of continuous B-cell epitopes in an antigen using recurrent neural network. Proteins. 2006;65(1):40-48. PubMed record
- IEDB Analysis Resource, B-cell epitope prediction tools