CoolFace
Apppublic

NavVerma/RNA_Accessibility_Probablity

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
README.md147 linesDownload Raw Back to root
1---2title: Cas13d Guide Accessibility Predictor3emoji: 🧬4colorFrom: blue5colorTo: green6sdk: docker7app_port: 78608pinned: false9license: mit10short_description: Cas13d guide RNA accessibility predictor for IAV.11---12 13# Cas13d Guide Accessibility Predictor14 15**Seek Labs · Infectious Disease Therapeutics**16 17Predicts structural accessibility of CRISPR-Cas13d guide sequences targeting Influenza A Virus (IAV) using ViennaRNA's partition function engine. Companion app to [Guide_Scrambler](https://huggingface.co/spaces/NavVerma/Guide_Scrambler) for NTC design and [Cas13d_Access](https://huggingface.co/spaces/NavVerma/cas13d-access) for on-target guide design.18 19Current version: see top of `app.py`.20 21---22 23## Quick start (for users)24 251. Open the live app and sign in with the shared team credentials.262. Paste a target sequence or upload a FASTA file.273. Choose window size (default 23 nt for Cas13d).284. The app computes three per-window metrics, overlays IAV Gray Zone regions, and grades each window.295. Optionally paste candidate guides to evaluate them against the accessibility profile.306. Export results as CSV.31 32---33 34## Features35 36- Raw sequence input or FASTA upload.37- Sliding window: 18–30 nt, default 23 nt.38- Three accessibility metrics per window:39  - **Pᵤ** (probability of being unpaired) from `pfl_fold_up` (W=80, L=40)40  - **Structural entropy** from the base-pair probability matrix (log₁₀)41  - **Ensemble defect** per window vs. the MFE structure42- Combined accessibility score: `(1 − entropy) × Pᵤ`.43- IAV Gray Zone overlay (Mirska et al., 2023): packaging signals, promoters, splice sites. Strict vs. permissive boundaries.44- Conservation weighting against strain panel (optional).45- SHAPE reactivity overlay (when available for the segment).46- Guide validator (single or bulk): paste a spacer, get position + grade + Gray Zone flag.47- Parallel + subsampled ED for long sequences (>1500 nt), typical 1–3 min.48- CSV export of full results.49 50---51 52## Authentication53 54The app is gated behind a shared username + password set as HF Space secrets. Without these set, the app runs ungated (useful for local dev).55 56Required Space secrets:57 58| Secret | Purpose |59|---|---|60| `GS_RNA_AUTH_USER` | Shared username (e.g. `naveen@seeklabs.com`) |61| `GS_RNA_AUTH_PASS` | Shared password |62 63Legacy fallback (still honored): `APP_USERNAME` + `APP_PASSWORD`, or `APP_PASSWORD` alone if you want password-only.64 65The login form lives at the top of `app.py` and uses `st.session_state` to keep the user signed in for the browser session. Closing the tab clears the session.66 67---68 69## Deployment on Hugging Face Spaces70 71### Space settings72 73- SDK: **Docker**74- Hardware: **CPU Basic** is sufficient for segments up to ~2400 nt.75- Storage Bucket: off76- Space Dev Mode: off77 78### Files needed (already in this repo)79 80```81app.py82Dockerfile83requirements.txt84README.md85DEVELOPMENT.md86.gitignore87.gitattributes88```89 90### Setting secrets91 92Go to the Space → Settings → **Repository secrets** and add:93- `GS_RNA_AUTH_USER`94- `GS_RNA_AUTH_PASS`95 96### Build time97 98First build: 5–8 min (ViennaRNA pip wheel install). Subsequent cold starts: ~40 s.99 100---101 102## Scoring103 104| Metric | Source | Interpretation |105|---|---|---|106| Pᵤ | `pfl_fold_up` (W=80, L=40) | Probability position is single-stranded |107| Structural entropy | BPP matrix, log₁₀ | Ensemble ambiguity; high = competing structures |108| Ensemble defect | Per-window MFE vs. ensemble | Deviation from most stable conformation |109| Score | `(1 − entropy) × Pᵤ` | Combined accessibility |110 111**Note on Shannon entropy**: Mirska et al.'s formula is defined over a multiple-sequence alignment and equals zero for a single sequence. This tool uses structural entropy from the ViennaRNA BPP matrix instead, which captures ensemble ambiguity for single-sequence input.112 113---114 115## Grading116 117| Grade | Effective score |118|---|---|119| Excellent | ≥ 0.55 |120| Good | ≥ 0.35 |121| Moderate | ≥ 0.15 |122| Poor | < 0.15 |123 124Guides overlapping a Gray Zone get a 30% penalty to their effective score.125 126---127 128## Gray Zone modes129 130- **Strict**: innermost experimentally validated regions only. Best for targeted screening where you want to flag the most problematic positions.131- **Permissive**: wider boundaries (+50 nt packaging signals, ±20 nt splice sites) for strain-to-strain variation. Recommended for pan-IAV guide design.132 133---134 135## Developer guide136 137See [DEVELOPMENT.md](./DEVELOPMENT.md) for architecture, "where things live", common edit recipes, and known gotchas.138 139---140 141## References142 143- Mirska B et al. (2023). *Nucleic Acids Res.* PMC10153785.144- Lorenz R et al. (2011). *ViennaRNA Package 2.0.* Algorithms Mol Biol 6:26.145- Konermann S et al. (2018). *Transcriptome Engineering with RNA-Targeting Type VI-D CRISPR Effectors.* Cell 173, 665–676.146- Wessels H-H et al. (2020). *Massively parallel Cas13 screens reveal principles for guide RNA design.* Nat Biotechnol 38, 722–727.147