Decision-grade essentiality calling for CRISPR-Cas9 fitness screens using BAGEL2 (Kim & Hart 2021 Genome Medicine). Computes Bayes Factors per gene by log-likelihood ratios over per-sgRNA fold changes, anchored against CEGv2 reference core-essentials (684 genes) and NEGv1 reference non-essentials (927 genes). Improvements over BAGEL1: linear extrapolation enables tumor-suppressor detection; multi-target off-target correction reduces false positives. BF >=6 corresponds to ~90% posterior probability of essentiality (Hart 2017); stricter BF cutoffs are BAGEL convention rather than a published FDR mapping.
# BAGEL2 (Python)
git clone https://github.com/hart-lab/bagel
# Run BAGEL.py directly from the clone; the repo has no setup.py and no PyPI release
# Reference gene sets
wget https://raw.githubusercontent.com/hart-lab/bagel/master/CEGv2.txt
wget https://raw.githubusercontent.com/hart-lab/bagel/master/NEGv1.txt
Required inputs: - Count matrix (tab-separated, columns: sgRNA, GENE, then sample columns) - Reference essential genes (CEGv2.txt) - Reference non-essential genes (NEGv1.txt) - Control sample (Day 0 or plasmid) for fold-change baseline
Tell the AI agent what to do: - "Run BAGEL2 on my Brunello screen: compute fold changes then Bayes factors using CEGv2/NEGv1; pick BF threshold from precision-recall analysis" - "Identify tumor-suppressor candidates from BAGEL2 negative BF values; cross-check against COSMIC tumor suppressor list" - "Compare BAGEL2 BF vs MAGeCK FDR on the same dataset; reconcile disagreements at BF 5-7 boundary" - "Diagnose BAGEL2 calling no hits despite known essentials -- is it a reference-set issue?" - "Calibrate BF threshold for clinical-grade essentiality: BF >12 vs BF >30, using BAGEL.py pr on my own screen"
"Run BAGEL.py fc then bf on counts.txt with controls Plasmid and treatment samples Drug_r1,Drug_r2,Drug_r3. Output bayes_factor.txt sorted by BF descending."
"Run BAGEL.py pr after to generate precision-recall curve against CEGv2; pick the BF threshold that reaches 95% precision on my screen's own PR curve."
"From BAGEL2 output, identify genes with BF <-6 (significantly negative). Cross-reference against COSMIC tumor suppressor gene list. Output candidate tumor suppressors with their BF, fold change, and sgRNAs."
"BAGEL2 calls 80 tumor-suppressor candidates in my dropout screen. Many don't replicate in literature -- investigate whether my screen design supports tumor-suppressor calling (drug-modifier vs simple dropout)."
"Compare BAGEL2 BF >6 hits vs MAGeCK RRA neg|fdr <0.05 hits on the same screen. Compute Jaccard similarity. Investigate top 10 disagreements."
"Adjust BF threshold based on screen quality. High-quality screen (PR-AUC against CEGv2 >0.85) supports BF >6. Lower-quality may need BF >12 for same precision."
"My BAGEL2 returns no genes with BF >0. Diagnose: wrong reference set file, library coverage too low, or genuinely flat screen?"
"Per-sgRNA LLR contributions show one guide dominating BF for several hits. Apply second-best-sgRNA rule from [[hit-calling]] to filter these guide-of-one hits."
BAGEL.py fc to compute fold changes from control samplesBAGEL.py bf to compute Bayes Factors (default: 10-fold cross-validation; -b -NB 1000 to bootstrap)BAGEL.py pr to generate precision-recall curve-b -NB to 5000+ for stable estimates.| Question | Answer |
|---|---|
| Standard cancer-line essentiality | BAGEL2 with CEGv2/NEGv1; BF >6 threshold |
| Drug-modifier screen wanting both directions | BAGEL2 (tumor-suppressor sensitive) or drugZ |
| Multi-cell-line panel | Chronos (DepMap) preferred over BAGEL2 |
| iPSC / primary cell / non-cancer | Use cell-type-specific essentialome |
| Custom library, <4 sgRNAs/gene | Bootstrap with -b -NB; consider MAGeCK alternative |
| Clinical-grade essentiality | BF >12 or higher |
Precision and recall are screen-specific -- generate them with BAGEL.py pr rather than assuming fixed values. The BF ladder used in practice:
| BF threshold | Use |
|---|---|
| 0 | Exploratory; highest recall |
| 6 | Standard call (~90% posterior, Hart 2017) |
| 12 | High-confidence |
| 30 | Ultra-stringent; near-certain essentials |
-b -NB 1000 used deliberately