Spaces:
Sleeping
Sleeping
Commit History
-
Fix AlphaFold viewer showing nothing (stale model version + silent 404)
Tengo Gzirishvili +1: Claude Sonnet 4.6Root cause: AlphaFold-DB bumped its model version DB-wide (v4 → v6), so the hardcoded …AF-{acc}-F1-model_v4.pdb URLs now 404. And Mol*'s loadStructureFromUrl does NOT throw on a 404 — it loads the XML error body, ends up with zero structures, removes our loading overlay, and silently leaves an empty viewer. Net effect: "won't show predicted models." Verified empirically: v4 → HTTP 404; AlphaFold's prediction API (/api/prediction/{acc}, CORS-enabled) reports latestVersion 6; loading the v6 .pdb yields 1 structure in the Mol* hierarchy. Fix (both the directed-evolution embed and the CRISPR M5 cut-site viewer): - _afResolveModelUrl(): pull the accession out of whatever URL we were given and resolve the CURRENT file URL from the AlphaFold API (falls back to the given URL on any error). Future-proof against the next version bump. - _afHasStructure(): after loadStructureFromUrl, assert a structure actually landed in the hierarchy; if not, throw so the catch surfaces a real message …20cdca4
-
CRISPR M5: structure viewer — cut site on the AlphaFold model
Tengo Gzirishvili +1: Claude Opus 4.8Reuses the Mol* 5.9.0 viewer already loaded for the directed-evolution page to show a guide's cut site on the gene's predicted 3-D structure. Backend: - Guide.cut_residue: maps each Cas9 cut → 1-based protein residue when a reading frame is resolvable (gene+organism aligned to CDS, or the input is itself a coding sequence). Exposed in /api/crispr/design. - resolve.resolve_uniprot(): gene symbol + organism → reviewed UniProt accession via the UniProt REST API → AlphaFold-DB model URL. Only the (gene, organism) leaves the Space. - GET-style POST /api/crispr/structure (sign-in gated) returns the UniProt accession + AlphaFold URLs. Frontend: - A "View 3-D structure · cut at residue N" button inside the M3 "why this guide" panel (shown only when a human/mouse gene context + a resolved residue exist — no new table column). - Structure modal mounts AlphaFold-DB via the proven mountAlphaFold path; header reads "GENE · UniProt XXXXX · cut at residue N…73b3e85 -
CRISPR M2: paste-anything input + fix phantom progress bar
Tengo Gzirishvili +1: Claude Opus 4.8Resolver (dee/core/resolve.py, new): one input box auto-detects and resolves a gene symbol, an accession (ENST…/ENSG…/NM_…/XM_…), or raw DNA into an editable sequence + a human label. - gene symbol → Ensembl canonical-transcript CDS (reuses exon.fetch_gene_structure; human/mouse). - Ensembl ID → /sequence/id?type=cds (gene IDs resolve to canonical tx). - RefSeq → NCBI efetch FASTA. - raw / FASTA → used as-is, makes NO network call (privacy: a pasted sequence never leaves the Space; only the identifier is sent). Conservative classifier: a long DNA-dominant blob is always a sequence. Endpoint POST /api/crispr/resolve (sign-in gated, same as design), returns {ok, kind, sequence, gene_symbol, label, source}. Frontend: a resolver row above the paste box (input + Fetch, Enter to submit) fills the textarea with the resolved sequence, shows a result chip, and auto-sets the gene-symbol field so base-edit AA consequences and exon context get the reading frame. Bug fix surfaced…4229225