A binary Cas classifier built on ESM-2 3B.
Cas-ProClassifier takes one or more protein sequences in FASTA format and decides whether each sequence is a CRISPR-associated (Cas) protein or not. It is a binary classifier — Cas vs Non-Cas — deliberately scoped to presence detection, not Cas-type or Cas-subtype labelling. Predictions come with a probability score and a per-fold consensus vote so users can triage borderline calls.
Why this tool
- Single-touch screen for candidate Cas proteins in hypothetical-protein sets, novel genome assemblies, and metagenomic catalogues.
- Embedding-only architecture: no PSSM, no HMM, no handcrafted descriptor pipeline — just an ESM-2 3B forward pass and a small ensemble head.
- Outperforms every published Cas-protein predictor on the same independent test sets (combined macro-F1 = 0.985 with 95 % CI 0.970–0.997 — see § 06).
- Lightweight session-only storage: input sequences are processed in memory and discarded once the job completes.
From FASTA to verdict.
Two interfaces are available depending on submission size.
Single-sequence — analysis.php
For one protein sequence (50 – 2000 aa, max 10 KB FASTA). Paste the sequence directly into the editor or upload a single-record FASTA file. Submission returns a job-id badge, a live progress bar while the embedding extraction runs, and a populated results table with the Cas / Non-Cas verdict, a calibrated probability, and the 0–5 fold-vote count.
Single-sequence runtime
≈ 1–3 s per sequence on GPU once the model is warm; the first request after server start incurs a one-time ~ 20 s ESM-2 3B weight load.
Batch — batch-analysis.php
For 1 – 50 sequences in one multi-FASTA file (max 500 KB).
Drop the file in the upload zone or use Browse. Each record
is dispatched as its own per-sequence job; rows appear in
the Your Batch Jobs table and update through the
queued → running → completed lifecycle. Click the eye icon
on a completed row to open view-job.php with
the per-sequence detail.
Email notifications (optional)
Provide an email and the server will send a completion notice per finished job, with a deep-link back to the results. SMTP is optional — if not configured server-side, the form submission still works without notifications.
Feed the parser.
Standard FASTA: every record begins with a header line starting
with > followed by the sequence on one or more lines.
Single-letter amino-acid codes only — non-standard residues
(X / B / Z / J / O / U) are rejected.
EXAMPLE · single-sequence FASTA>sp|A0Q5Y3|CAS9_FRATN CRISPR-associated endonuclease Cas9 MNFKILPIAIDLGVKNTGVFSAFYQKGTSLERLDNKNGKVYELSKDSYTLLMNNRTARRH QRRGIDRKQLVKRLFKLIWTEQLNLEWDKDTQQAISFLFNRRGFSFITDGYSPEYLNIVP EQVKAILMDIFDDYNGEDDLDSYLKLATEQESKISEIYNKLMQKILEFKLMKLCTDIKDD
EXAMPLE · multi-sequence FASTA (batch only)>Seq1_unknown_query MKFHKQKRDEFKYFEYDKGKDMSPWKEFEAPMKPRGNLRQNSLTGDNRMSV... >Seq2_cas_candidate MEKLQVAKMNFNTPEISLRKHKRRREELVNKSLNMVPNSELKGDKRSGLPF...
Limits
Single submission (analysis.php)
- Exactly 1 FASTA record
- Sequence length: 50 – 2000 aa
- Max file size: 10 KB
Batch submission (batch-analysis.php)
- 1 – 50 records per file
- Each sequence: 50 – 2000 aa
- Max file size: 500 KB
- Each record submitted as its own per-sequence job
Accepted file extensions
.fasta · .fa · .txt — UTF-8 encoded, plain text only.
From tokens to vote.
The classifier is a frozen, deterministic pipeline. There are no user-tunable hyperparameters at inference time — the same five steps run for every submission, and the same trained 5-fold ensemble produces the verdict.
Step 01 — ESM-2 3B embedding
The query sequence is tokenised with the ESM-2 tokenizer
(facebook/esm2_t36_3B_UR50D) and passed through the
3B-parameter transformer in fp16. The
last_hidden_state tensor is mean-pooled over the
non-padding tokens, yielding a fixed
2560-dimensional float32 vector.
Step 02 — Feature reduction (5-fold, fixed)
- StandardScaler (per-fold) to zero-mean / unit-variance.
- VarianceThreshold drops zero-variance dimensions.
- SelectKBest (ANOVA F-test) keeps the top
k = 500dimensions. - mRMR (max-relevance min-redundancy) reduces to
k = 200. - Boruta (over LightGBM, 100 iterations) confirms a small subset (≈ 30–55 features per fold).
Step 03 — Per-fold winning classifier
During training, each fold ran a model zoo (KNN k ∈ {1, 2, 3, 5, 7}, RBF-SVM C ∈ {0.1, 1.0, 3.0, 10}, LinearSVC) on the Boruta-confirmed feature subset and selected the per-fold winner by validation macro-F1. The frozen production model uses KNN k=2 / k=5 and RBF-SVM C ∈ {0.1, 1.0, 3.0} across the five folds (winner identity is stored in each fold artefact).
Step 04 — Per-fold probability + threshold
Each fold's classifier returns a Cas probability; a per-fold threshold (tuned at training time) maps probability → label. Thresholds are calibrated per fold (typical range 0.10 – 0.79).
Step 05 — 5-fold majority vote + reported probability
Final label = majority across the 5 folds
(≥ 3/5 votes → Cas+).
Reported probability = mean of the 5 fold
probabilities (a smoother score than the binary vote and
useful for ranking).
fold_votes column = the actual count (0–5),
surfaced so users can spot borderline 2/5 or 3/5 calls.
Read the posting.
Every prediction row carries four numbers worth understanding — the binary label, the calibrated probability, the fold-vote count, and (for batch jobs) the per-sequence runtime.
Output schema
| Column | Meaning | Example |
|---|---|---|
sequence_id |
FASTA header (first whitespace-delimited token) | sp|A0Q5Y3|CAS9_FRATN |
prediction |
Binary label, 1 = Cas, 0 = Non-Cas | 1 |
label |
Human-readable label | Cas / Non-Cas |
probability |
Mean Cas probability across the 5 folds (range 0–1) | 0.9992 |
fold_votes |
Count of folds that voted Cas+ (0–5) | 5 |
Confidence tiers (based on probability)
Reading the fold-vote count
5/5— unanimous Cas call. Probability typically > 0.95. Highest confidence.4/5or3/5— majority Cas. The dissenting fold(s) saw something atypical; probability around 0.6–0.85.2/5— minority Cas. Final label is Non-Cas (the threshold is ≥3/5). Reported probability often near the decision boundary; flag for manual review.1/5or0/5— Non-Cas. The lower the count, the further from the Cas embedding cluster.
Exports
Three formats from the results panel: CSV (column-aligned, suitable for downstream pandas / Excel), JSON (preserves the full ensemble output), PDF (single-page client-side report with the table + summary chart, generated via jsPDF in the browser).
Numbers on held-out data.
Training and evaluation followed strict leakage controls: the model was locked before any contact with the independent test sets, and CD-HIT (40 %) deduplication was applied between training and test pools.
Cross-validation (5-fold stratified, N = 330)
- Macro-F1 = 0.991 ± 0.018
- MCC = 0.984
- Same fold splits used by all comparison ablations
(
StratifiedKFold(n_splits=5, shuffle=True, random_state=42)).
Independent dataset evaluation
Two held-out sets were carried over from the HELI-Cas reference evaluation, with deduplication against the training set verified at 100 % identity:
- D1 (CRISPRCasStack-derived): N = 206 (103 Cas / 103 Non-Cas)
- D2 (CASPredict test split): N = 128 (64 Cas / 64 Non-Cas)
| Split | F1-macro (95 % CI) | MCC (95 % CI) | AUC-ROC | Errors |
|---|---|---|---|---|
| D1 (N = 206) | 0.985 (0.970 – 1.000) | 0.971 (0.942 – 1.000) | 0.994 | 3 / 206 |
| D2 (N = 128) | 0.984 (0.961 – 1.000) | 0.969 (0.924 – 1.000) | 1.000 | 2 / 128 |
| Combined (N = 334) | 0.985 (0.970 – 0.997) | 0.970 (0.941 – 0.994) | 0.995 | 5 / 334 |
Comparison with published Cas-protein predictors
| Predictor | Combined F1 | Combined MCC |
|---|---|---|
| Cas-ProClassifier (this tool) | 0.985 | 0.970 |
| HELI-Cas v3 (handcrafted ensemble) | 0.973 | 0.946 |
| CasPro-ESM2 (D1-trained release weights) | 0.886 | 0.774 |
| CRISPRCasStack (re-run on D1 + D2) | 0.883 | 0.770 |
Submit many, monitor once.
Batch mode dispatches each FASTA record in your file as its own per-sequence prediction job. Results stream into the Your Batch Jobs table as they complete.
How it works
- Drag-and-drop or browse a multi-FASTA file (1 – 50 records, max 500 KB).
- Optionally set a Job Name — each per-sequence job is labelled
<batch name> — <sequence id>. - Optionally provide an Email — each completed job sends a notice with a deep-link to its results.
- Click Start Batch Analysis. A row is added to the jobs table for every record in the file.
- Status transitions:
queued→running→completed(orfailed). Click the eye icon on a completed row to openview-job.phpwith the per-sequence detail.
Template
The Download Template button gives you a curated multi-FASTA file of 5 sequences (3 Cas + 2 Non-Cas controls, each chosen for short length so the demo runs in < 30 s).
Local history
The jobs table persists in localStorage so the page
survives reloads. The Clear History button only
purges the local list — it does not cancel running jobs
on the server.
n × 1–3 s on a warm GPU.
What it won't do.
Honest framing — important for downstream interpretation.
Out of scope
- Cas type / subtype calling. The model returns a binary Cas / Non-Cas verdict only. For type (I–VI) or subtype (e.g. I-F, II-A, V-A) classification, run a Pfam / TIGRFAM HMM scan or a CRISPRCasFinder pipeline on the candidates flagged here.
- Anti-CRISPR detection. Anti-CRISPR proteins (Acr*) are not part of the training distribution; treat their predictions as out-of-distribution.
- Nucleotide input. Protein FASTA only. Translate ORFs upstream (Prodigal, Pyrodigal, or an ORF-finder of your choice).
- Sequences shorter than 50 aa or longer than 2000 aa. The pipeline rejects these at submission.
- Sequences with non-standard residues (
X / B / Z / J / O / U). Clean these before submitting.
Known weakness
On the original 650M-embedding deployment, Type I-F Csy3/Csy4 Cascade subunits were under-represented in training and showed a generalisation gap on D2. The current 3B deployment closes that gap (D2 errors 13 → 2) but you may still see lower-confidence calls on rare Cas families with thin Swiss-Prot coverage — inspect the fold-vote count for borderline cases.
Privacy
- Sequences are processed in memory by a single-tenant API and discarded once the job completes.
- No sequence content is logged at INFO level; only the job-id, length, and timing.
- Email addresses, when supplied, are used only for the per-job completion notice and are not retained beyond the job lifecycle.
- The browser-side history (Your Batch Jobs table) is stored in
localStorageon your device and never transmitted.
Reproducibility
The model is deterministic: same FASTA → same probabilities,
bit-for-bit, on the same GPU architecture. Fold artefacts
(fold_0.joblib … fold_4.joblib) and the
ESM-2 3B weights are version-pinned. Re-runs of the same input
will produce identical outputs.