CoolFace
Apppublic

NavVerma/RNA_Accessibility_Probablity

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

Cas13d Guide Accessibility Predictor

Seek Labs · Infectious Disease Therapeutics

Predicts structural accessibility of CRISPR-Cas13d guide sequences targeting Influenza A Virus (IAV) using ViennaRNA's partition function engine. Companion app to Guide_Scrambler for NTC design and Cas13d_Access for on-target guide design.

Current version: see top of app.py.


Quick start (for users)

  1. 1.Open the live app and sign in with the shared team credentials.
  2. 2.Paste a target sequence or upload a FASTA file.
  3. 3.Choose window size (default 23 nt for Cas13d).
  4. 4.The app computes three per-window metrics, overlays IAV Gray Zone regions, and grades each window.
  5. 5.Optionally paste candidate guides to evaluate them against the accessibility profile.
  6. 6.Export results as CSV.

Features

  • Raw sequence input or FASTA upload.
  • Sliding window: 18–30 nt, default 23 nt.
  • Three accessibility metrics per window:
  • Pᵤ (probability of being unpaired) from pfl_fold_up (W=80, L=40)
  • Structural entropy from the base-pair probability matrix (log₁₀)
  • Ensemble defect per window vs. the MFE structure
  • Combined accessibility score: (1 − entropy) × Pᵤ.
  • IAV Gray Zone overlay (Mirska et al., 2023): packaging signals, promoters, splice sites. Strict vs. permissive boundaries.
  • Conservation weighting against strain panel (optional).
  • SHAPE reactivity overlay (when available for the segment).
  • Guide validator (single or bulk): paste a spacer, get position + grade + Gray Zone flag.
  • Parallel + subsampled ED for long sequences (>1500 nt), typical 1–3 min.
  • CSV export of full results.

Authentication

The app is gated behind a shared username + password set as HF Space secrets. Without these set, the app runs ungated (useful for local dev).

Required Space secrets:

SecretPurpose
GS_RNA_AUTH_USERShared username (e.g. naveen@seeklabs.com)
GS_RNA_AUTH_PASSShared password

Legacy fallback (still honored): APP_USERNAME + APP_PASSWORD, or APP_PASSWORD alone if you want password-only.

The 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.


Deployment on Hugging Face Spaces

Space settings

  • SDK: Docker
  • Hardware: CPU Basic is sufficient for segments up to ~2400 nt.
  • Storage Bucket: off
  • Space Dev Mode: off

Files needed (already in this repo)

app.py
Dockerfile
requirements.txt
README.md
DEVELOPMENT.md
.gitignore
.gitattributes

Setting secrets

Go to the Space → Settings → Repository secrets and add:

  • GS_RNA_AUTH_USER
  • GS_RNA_AUTH_PASS

Build time

First build: 5–8 min (ViennaRNA pip wheel install). Subsequent cold starts: ~40 s.


Scoring

MetricSourceInterpretation
Pᵤpfl_fold_up (W=80, L=40)Probability position is single-stranded
Structural entropyBPP matrix, log₁₀Ensemble ambiguity; high = competing structures
Ensemble defectPer-window MFE vs. ensembleDeviation from most stable conformation
Score(1 − entropy) × PᵤCombined accessibility

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.


Grading

GradeEffective score
Excellent≥ 0.55
Good≥ 0.35
Moderate≥ 0.15
Poor< 0.15

Guides overlapping a Gray Zone get a 30% penalty to their effective score.


Gray Zone modes

  • Strict: innermost experimentally validated regions only. Best for targeted screening where you want to flag the most problematic positions.
  • Permissive: wider boundaries (+50 nt packaging signals, ±20 nt splice sites) for strain-to-strain variation. Recommended for pan-IAV guide design.

Developer guide

See DEVELOPMENT.md for architecture, "where things live", common edit recipes, and known gotchas.


References

  • Mirska B et al. (2023). Nucleic Acids Res. PMC10153785.
  • Lorenz R et al. (2011). ViennaRNA Package 2.0. Algorithms Mol Biol 6:26.
  • Konermann S et al. (2018). Transcriptome Engineering with RNA-Targeting Type VI-D CRISPR Effectors. Cell 173, 665–676.
  • Wessels H-H et al. (2020). Massively parallel Cas13 screens reveal principles for guide RNA design. Nat Biotechnol 38, 722–727.