syntheogenesis / dee /static /index.html
Tengo Gzirishvili
Claude Sonnet 4.6
Reframe app around Design→Build→Edit→Learn loop
1fdd762
Raw History Blame Contribute Delete
136 kB
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>TuringDNA · Engine</title> <meta name="description" content="TuringDNA — an integrated protein- and DNA-engineering workbench: directed evolution, CRISPR guide design, primer analysis, and a plasmid editor." /> <meta name="theme-color" content="#1b1a17" /> <meta name="color-scheme" content="dark light" /> <meta name="referrer" content="strict-origin-when-cross-origin" /> <!-- The canonical product lives at turingdna.com; the raw engine URL isn't indexed. --> <meta name="robots" content="noindex,follow" /> <!-- Theme bootstrap — runs BEFORE the stylesheet so <html data-theme> is set before first paint (no flash on load). Dark is the default; a saved choice (from the topbar toggle) overrides it. First-party inline script; touches only our own localStorage + documentElement. --> <script> (function () { try { var t = localStorage.getItem('td-theme'); if (t !== 'light' && t !== 'dark') { t = 'dark'; } // dark by default document.documentElement.setAttribute('data-theme', t); } catch (e) { document.documentElement.setAttribute('data-theme', 'dark'); } })(); </script> <!-- ?v= query bumps invalidate browser + iframe asset caches when app.css / app.js change. Bump these numbers whenever you ship a frontend update — without them, users keep getting the stale file for up to a week. --> <link rel="stylesheet" href="/static/app.css?v=20260614-loop" /> <link rel="icon" type="image/svg+xml" href="/static/favicon.svg?v=2" /> <link rel="apple-touch-icon" href="/static/favicon.svg?v=2" /> <!-- Mol* (PDBe) 3-D viewer is ~4.9 MB. We do NOT eager-load it on every page view — app.js ensureMolstar() loads it lazily the first time a Fold / AlphaFold viewer is opened, with a jsDelivr → unpkg fallback and no fixed timeout (the old eager `defer` + 8 s wait was why both viewers "failed to load" so often on slower links). Preconnect just warms the CDNs so that first lazy load is fast. --> <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin /> <link rel="preconnect" href="https://unpkg.com" crossorigin /> </head> <body> <!-- Bio-luminous atmospheric backdrop (ambient glow + vignette + grain), painted under the app; dark-mode only. Fades in on load. --> <div class="bg-atmos" id="bgAtmos" aria-hidden="true"></div> <!-- Cursor-following luminous aurora (desktop, dark, motion-on). --> <div id="cursorGlow" aria-hidden="true"></div> <script> (function(){ var a=document.getElementById('bgAtmos'); if(a) requestAnimationFrame(function(){a.classList.add('lit');}); var reduce=false; try{reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;}catch(e){} if(reduce || !matchMedia('(pointer: fine)').matches) return; var cg=document.getElementById('cursorGlow'); if(!cg) return; var tx=innerWidth/2, ty=innerHeight/2, cx=tx, cy=ty, raf=null; function tick(){ raf=null; cx+=(tx-cx)*0.12; cy+=(ty-cy)*0.12; cg.style.setProperty('--cx', cx.toFixed(1)+'px'); cg.style.setProperty('--cy', cy.toFixed(1)+'px'); if(!document.hidden && (Math.abs(tx-cx)>0.5 || Math.abs(ty-cy)>0.5)) raf=requestAnimationFrame(tick); } window.addEventListener('pointermove', function(e){ tx=e.clientX; ty=e.clientY; cg.style.opacity='1'; if(!raf && !document.hidden) raf=requestAnimationFrame(tick); }, {passive:true}); document.addEventListener('mouseleave', function(){ cg.style.opacity='0'; }); })(); </script> <!-- One-time material-change notice (Privacy/Terms v2.0). Dismiss persists in localStorage. --> <div id="policyNotice" class="policy-notice" hidden> <span class="policy-notice-text">We've updated our <a href="https://turingdna.com/privacy/" target="_blank" rel="noopener">Privacy Policy</a> &amp; <a href="https://turingdna.com/terms/" target="_blank" rel="noopener">Terms</a> (v2.0, effective 8&nbsp;Jul&nbsp;2026): we now use <strong>anonymous, aggregated</strong> signals to improve our models. Your individual sequences stay private — never shared, exposed, or reproduced. Prefer not to continue? You can export or delete your data before then (<a href="https://turingdna.com/contact/" target="_blank" rel="noopener">contact us</a>).</span> <button type="button" id="policyNoticeClose" class="policy-notice-close">Got&nbsp;it</button> </div> <div class="app"> <!-- ============================== SIDEBAR ============================== --> <aside class="sidebar" id="sidebar"> <a class="brand" href="/"> <span class="brand-mark" aria-hidden="true"> <!-- Living logo: perpetually-writhing supercoiled plasmid (Canvas, animated by initPlasmidLogo() in app.js). --> <canvas class="brand-mark-canvas" aria-hidden="true"></canvas> </span> <span class="brand-word">TuringDNA</span> </a> <!-- Editorial sidebar nav. Was a SaaS-clone with bucket-section labels ("Workspace" / "Reference"), SVG icons next to every item, and a debug widget at the bottom exposing the raw HuggingFace model identifier + a "Stop server" button. All of that read as AI-generated SaaS dashboard scaffolding and broke the editorial register the rest of the system targets. Now: type-only, no buckets, no debug. Library / History / Documentation listed inline. --> <nav class="nav"> <!-- "Start here" — opens the goal router ("What are you working on?") so a newcomer who knows their aim lands in the right tool. Action item (role=button), not a route. --> <a class="nav-item nav-item-start" id="navStartHere" role="button" tabindex="0">Start here</a> <!-- Directed Evolution — ESM-2 zero-shot variant-library generator (the flagship engine). NOT de novo design. Listed first (2026-06-13): this is the entry point of the design→build→edit→learn loop the rest of the sidebar supports. Plasmid Editor remains the default route below. --> <a class="nav-item" href="#design">Directed Evolution</a> <!-- Plasmid Editor — the workbench HUB and DEFAULT view (2026-06-04). Import GenBank/FASTA, annotate, view the circular/linear map, run restriction + digest, simulate cloning, then launch the other tools on a loaded construct (Use in ▾ menu / region hand-offs → CRISPR, Primer Analysis, Directed Evolution). Sign-in gated like the rest. --> <a class="nav-item active" href="#plasmid">Plasmid Editor</a> <!-- CRISPR tool — Cas9 knockout gRNA designer. Sign-in gated (free for any account); anonymous users see the same view but with a sign-in overlay over the submit button. Shipped 2026-05-28, pulled same day for backtest + audit (see CRISPR_AUDIT_2026-05-28.md for the bug-fixes that landed), re-enabled after 30-test suite passed clean. --> <a class="nav-item" href="#crispr">CRISPR</a> <!-- Primer Picker — batch-analyse candidate primers against the user's template (on-server) + NCBI nt (opt-in specificity), then rank + recommend the best. Sign-in gated like CRISPR. --> <a class="nav-item" href="#primers">Primer Analysis</a> <!-- My designs — opens the saved-designs modal directly from the nav (2026-05-30), so signed-in users can reopen a past guide set without first running a new design. Sign-in gated by the same /api/crispr/designs guard; an anonymous click routes to the sign-in modal. --> <a class="nav-item" id="navMyDesigns" role="button" tabindex="0">My designs</a> <!-- Library + History tabs removed 2026-05-27. They called /api/library which read the Space-shared ~/.dee/output/ directory — a single-user-desktop relic that exposed every user's CSVs to every other user (audit C2). The replacement is the per-user /dashboard/ page on the landing site, planned as task #98, backed by Supabase Storage with RLS-gated reads. --> <a class="nav-item" href="#docs">Documentation</a> </nav> <!-- Account row — docked at the FOOT of the sidebar (the .nav above is flex:1, so this pins to the bottom) the way Claude's account area sits at the bottom of its rail. Populated + toggled by auth.js (_renderSidebarAccount); stays hidden for anonymous visitors (the /app wrapper shows its own "Sign in" affordance). The menu opens upward; "Sign out" asks the wrapper to drop the Supabase session, then lands on /signin. --> <div class="sidebar-account" id="sidebarAccount" hidden> <button type="button" class="acct-trigger" id="acctTrigger" aria-haspopup="menu" aria-expanded="false"> <span class="acct-avatar" id="acctAvatar" aria-hidden="true"></span> <span class="acct-meta"> <span class="acct-name" id="acctName">&nbsp;</span> <span class="acct-plan">Signed in</span> </span> <svg class="acct-chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <polyline points="18 15 12 9 6 15"/> </svg> </button> <div class="acct-menu" id="acctMenu" hidden role="menu" aria-label="Account"> <p class="acct-menu-email" id="acctMenuEmail"></p> <button type="button" class="acct-menu-item" id="acctSignOut" role="menuitem">Sign out</button> </div> </div> </aside> <!-- ============================== MAIN ============================== --> <main class="content"> <!-- Topbar trimmed to just the mobile hamburger. Was carrying a breadcrumb to nowhere (Design › New library, when there's nothing above "Design" to navigate back to) and a Linear- clone ⌘K search trigger that wasn't wired to anything useful. Both read as SaaS scaffolding and have been removed. The hamburger stays for the mobile drawer toggle. --> <header class="topbar"> <button class="nav-toggle" id="navToggle" type="button" aria-label="Open navigation" aria-controls="sidebar" aria-expanded="false"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <line x1="3" y1="6" x2="21" y2="6"/> <line x1="3" y1="12" x2="21" y2="12"/> <line x1="3" y1="18" x2="21" y2="18"/> </svg> </button> <div class="topbar-titles"> <h1 class="topbar-title" id="topbarTitle">Plasmid Editor</h1> <span class="topbar-sub" id="topbarSub">Map, annotate &amp; clone your construct</span> </div> <!-- Light / dark theme toggle. State lives on <html data-theme>, persisted to localStorage by app.js. Sun shows in dark mode, moon in light mode (CSS-swapped by the data-theme attr). --> <button class="theme-toggle" id="themeToggle" type="button" aria-label="Toggle light and dark theme" aria-pressed="false" title="Toggle light / dark"> <svg class="theme-icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/> </svg> <svg class="theme-icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="12" cy="12" r="4.5"/> <path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/> </svg> </button> </header> <!-- ================================================================= Research-use-only strip — always visible immediately under the topbar so the framing is in front of the user during every action (paste, edit, synthesize, download). The "Why?" button re-opens the first-use disclaimer modal so the user can re-read the full text at any time. This strip pairs with the click-through modal in #firstUseModal below; together they're the in-UI half of the "research use only" legal narrative. ================================================================= --> <div class="research-strip" role="status" aria-label="Research use disclaimer"> <span class="research-strip-dot" aria-hidden="true">●</span> <span class="research-strip-text"> <strong>Research use only.</strong> Computational predictions — visually verify every sequence before ordering DNA. </span> <button class="research-strip-link" id="researchStripWhy" type="button">Why?</button> </div> <!-- Scrim covering the workspace while the sidebar drawer is open on mobile. Tap to dismiss. Hidden on tablet+ via CSS. --> <div class="sidebar-scrim" id="sidebarScrim" hidden></div> <div class="workspace"> <!-- =============================== DESIGN view (default) --> <section class="view view--design" data-view="design"> <!-- Hero. Was carrying a generic eyebrow kicker ("PLM-GUIDED DIRECTED EVOLUTION") AND a 4-step pipeline-cards row (01 Parse & translate → 02 Zero-shot score → 03 Combinatorial search → 04 Codon optimize) on the right. Both were AI-generated SaaS bloat. The eyebrow said nothing the headline doesn't; the pipeline chips were decorative "look how complete I am" boxes. Replaced with a § Begin kicker matching the landing's editorial register and a single-column layout. --> <section class="hero" id="hero"> <p class="hero-kicker">&sect; Begin</p> <h1>Design a smart mutation library</h1> <p class="hero-lede"> Provide a wild-type sequence — get a library of multi-mutant variants ranked by predicted fitness, codon-optimized for your expression host, and ready to order from your synthesis vendor. From there: build the construct in the Plasmid Editor, edit it with CRISPR if the project calls for it, and log what you measure to design a sharper round two. </p> </section> <!-- Input section. Card headers throughout used to carry a boxy step-num badge (1, 2, 3 + done-checkmark) treating a research tool like Stripe Checkout. Replaced with the same § N kicker pattern as the landing chapters so the app reads as the next chapter of the same publication. --> <section class="card" id="inputCard"> <header class="card-header"> <div class="card-header-left"> <p class="card-kicker">&sect; 1 &middot; Sequence</p> <h2>Provide a wild-type</h2> <p class="card-sub">FASTA, SnapGene, GenBank, raw DNA, or raw protein. Auto-detected.</p> </div> <button class="ghost" type="button" id="deExampleBtn" title="Loads GFP — a classic directed-evolution target">Try an example</button> </header> <div class="input-tabs" role="tablist"> <button class="tab active" data-tab="upload" role="tab"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/> </svg> Upload file </button> <button class="tab" data-tab="paste" role="tab"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/> </svg> Paste </button> </div> <div class="tab-panel active" data-panel="upload"> <label class="dropzone" id="dropzone"> <input type="file" id="fileInput" hidden accept=".fa,.fasta,.fna,.faa,.pep,.dna,.gb,.gbk,.genbank,.embl,.txt" /> <div class="dz-icon"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"/><path d="M12 12v9"/><path d="m16 16-4-4-4 4"/> </svg> </div> <div class="dz-copy"> <strong>Drop a sequence file</strong> <span>or click to browse</span> </div> <!-- The format chip row that used to live here ("FASTA · SnapGene · GenBank · EMBL · plain DNA / protein") was redundant — the same list is already in the card-sub directly above this dropzone. Removed. --> </label> </div> <div class="tab-panel" data-panel="paste"> <div class="paste-shell"> <div class="paste-gutter" id="pasteGutter"><span>1</span></div> <textarea id="pasteArea" rows="9" spellcheck="false" wrap="off" autocorrect="off" autocapitalize="off" autocomplete="off" inputmode="text" placeholder="Paste FASTA, raw DNA (ATGC…), or raw protein (MVSKG…). FASTA headers, whitespace, and stop asterisks all OK."></textarea> </div> <div class="paste-actions"> <span class="paste-stats" id="pasteStats">0 chars</span> <button id="pasteSubmit" class="primary-ghost">Use this sequence</button> </div> </div> <div class="preview" id="preview" hidden> <div class="preview-meta"> <div> <span class="meta-label">Identifier</span> <span class="meta-val" id="metaIdent"></span> </div> <div> <span class="meta-label">Detected</span> <span class="meta-val pill" id="metaKind"></span> </div> <div> <span class="meta-label">Length</span> <span class="meta-val" id="metaLen"></span> </div> </div> <div class="preview-seq" id="metaPreview"></div> <!-- NCBI BLAST identification (opt-in). Sequence leaves this machine and goes to NCBI's public BLAST servers. Cached by SHA256(protein) — same input returns instantly. --> <div class="identify-row" id="identifyRow"> <button class="ghost identify-btn" id="identifyBtn"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/> </svg> Identify via NCBI BLAST </button> <span class="identify-hint">Sends your sequence to NCBI · 30–90 s · skip if your sequence is proprietary</span> </div> <!-- BLAST result panel (lives inline below the Identify button). The first-use CONSENT panel is no longer rendered here — it pops as a centered modal (#blastConsentModal at the bottom of the page) so it stays in view regardless of scroll position. --> <div class="identify-panel" id="identifyPanel" hidden></div> </div> <div class="cds-picker" id="cdsPicker" hidden> <h3>Multiple CDS features detected — pick the gene to evolve</h3> <p class="muted">The longest CDS in a plasmid is usually the antibiotic resistance gene. Pick your gene of interest.</p> <div class="cds-list" id="cdsList"></div> </div> </section> <section class="card" id="settingsCard"> <header class="card-header"> <p class="card-kicker">&sect; 2 &middot; Search</p> <h2>Tune the parameters</h2> <p class="card-sub">Sensible defaults — change if you know what you're after.</p> </header> <div class="setting-grid"> <label class="setting"> <span class="setting-name">Variants to generate</span> <span class="setting-hint">Top-K multi-mutants returned in the library.</span> <input type="number" id="settingK" value="30" min="5" max="500" step="5" /> </label> <label class="setting"> <span class="setting-name">Max mutations / variant</span> <span class="setting-hint">Cap on simultaneous substitutions per variant.</span> <input type="number" id="settingMax" value="5" min="1" max="20" /> </label> <label class="setting"> <span class="setting-name">Top-percentile pool</span> <span class="setting-hint">Keep mutations above this ΔLL percentile.</span> <input type="number" id="settingPct" value="85" min="50" max="99" step="1" /> </label> <label class="setting"> <span class="setting-name">Expression host</span> <span class="setting-hint">Codon-usage table for reverse translation.</span> <select id="settingHost"> <option value="e_coli">Escherichia coli</option> <option value="yeast">Saccharomyces cerevisiae</option> <option value="human">Homo sapiens</option> </select> </label> <label class="setting"> <span class="setting-name">PLM model</span> <span class="setting-hint">Larger = sharper scoring, slower on CPU.</span> <select id="settingModel"> <option value="small">ESM-2 · 35M (default, fast)</option> <option value="medium" disabled>ESM-2 · 650M — Pro · GPU (coming soon)</option> <option value="large" disabled>ESM-2 · 3B — Pro · GPU (coming soon)</option> </select> </label> </div> </section> <section class="card run-card" id="runCard"> <header class="card-header"> <p class="card-kicker">&sect; 3 &middot; Generate</p> <h2>Run the engine</h2> <p class="card-sub">Scoring runs on our GPU. Your individual sequences are never shared, exposed, or reproduced; only anonymous, aggregated signals improve our models. <a href="https://turingdna.com/privacy/" target="_blank" rel="noopener">Privacy</a>.</p> </header> <button id="runBtn" type="button" class="primary primary-lg" disabled> <span class="primary-icon" aria-hidden="true"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polygon points="6 3 20 12 6 21 6 3" fill="currentColor"/> </svg> </span> <span class="primary-content"> <span class="primary-label">Generate smart library</span> <span class="primary-sub">Load a sequence to enable</span> </span> </button> <div class="progress-shell" id="progressShell" hidden> <div class="progress-bar"> <div class="progress-fill" id="progressFill"></div> </div> <div class="progress-meta"> <span id="progressStatus">Starting…</span> <span id="progressElapsed">0.0s</span> </div> <div class="progress-message" id="progressMessage"></div> </div> </section> <!-- Empty state. Was carrying an unDraw-style placeholder SVG (rectangles + check-circle) that read as the AI-y "empty state illustration" cliché found on every SaaS landing screen. Replaced with a quiet editorial block: § kicker + italic display title + lede. No illustration. --> <section class="empty-state" id="emptyState"> <p class="empty-kicker">&sect; Awaiting input</p> <h3 class="empty-title">The library appears here.</h3> <p class="empty-sub">Provide a sequence above and click Generate. Results render as a sortable variant table with mutation map, PCR primers, and one-click synthesis ordering.</p> </section> <!-- Results section. Was carrying a step-num done-checkmark badge (treating results as "step 4 completed") and download-menu items each had a tautological subtitle (CSV — "Spreadsheet · universal"). Both removed. Format names alone carry the meaning; users who don't know what CSV is aren't the audience. --> <section class="card results-card" id="resultsCard" hidden> <header class="card-header results-header"> <div class="card-header-left"> <p class="card-kicker">&sect; 4 &middot; Library</p> <h2>Variants</h2> <p class="card-sub" id="resultSummary"></p> </div> <div class="results-actions"> <div class="download-menu" id="downloadMenu"> <button class="ghost download-trigger" type="button" id="downloadTrigger"> Export <span class="caret">▾</span> </button> <div class="download-menu-items" id="downloadMenuItems" hidden> <a class="download-item" data-format="csv">CSV</a> <a class="download-item" data-format="xlsx">Excel</a> <a class="download-item" data-format="fasta">FASTA &middot; protein</a> <a class="download-item" data-format="fasta-dna">FASTA &middot; DNA</a> <a class="download-item" data-format="gb">GenBank</a> <a class="download-item" data-format="json">JSON</a> <a class="download-item" data-format="tsv">TSV</a> </div> </div> </div> </header> <details class="how-to-read"> <summary>How to read this</summary> <div class="how-to-read-body"> <p><strong>Fitness</strong> &mdash; the summed ESM-2 log-likelihood gain over wild-type (&Sigma;&Delta;LL) across the variant&rsquo;s mutations. Higher means the model finds that combination more evolutionarily plausible. It&rsquo;s a prior, not a verdict &mdash; screen experimentally.</p> <p><strong>Mutations</strong> &mdash; substitutions vs. wild-type (WT&middot;position&middot;new, e.g. <code>W58L</code>). &nbsp;<strong>GC %</strong> &mdash; GC of the codon-optimized DNA (40&ndash;60% is PCR-friendly). &nbsp;<strong>Tm</strong> &mdash; primer melting temp. &nbsp;<strong>bp</strong> &mdash; amplicon length.</p> <p><strong>Filter box:</strong> <code>C49</code> = variants mutating residue 49 &middot; <code>W58L</code> = that exact substitution &middot; <code>gc&gt;50</code>, <code>tm&gt;58</code>, <code>fitness&gt;2</code>, <code>bp&lt;800</code> = numeric ranges.</p> <p class="how-to-read-note">Stay shallow &mdash; cap at 3&ndash;4 mutations per variant unless you have a structural reason.</p> </div> </details> <!-- Stats-strip (5 KPI tiles: Top fitness / Position coverage / Mean GC / Cooler primer Tm / Amplicon) removed. It was THE single most "SaaS dashboard" element in the entire app — variant-level stats belong in the table; aggregate run quality belongs in the methods paragraph below. --> <!-- Run metadata + auto-generated methods text. Filled by JS. --> <div class="run-meta" id="runMeta" hidden></div> <!-- Round-2 banner: set when a library was proposed from logged results. --> <div class="round2-banner" id="round2Banner" hidden></div> <!-- Mutation map (lollipop chart). Was carrying a chip- legend (Low / Med / High dots) that read as dashboard scaffolding; legend text is now inline in the description. --> <div class="mutmap-card" id="mutmapCard"> <div class="mutmap-head"> <h3>Mutation landscape</h3> <p class="muted">Where mutations land across the protein. Bar height counts variants sharing a position; color encodes ΔLL strength (faint &middot; medium &middot; saturated).</p> </div> <div class="mutmap-canvas" id="mutmapCanvas"></div> </div> <!-- Filter bar — instant client-side filter over the rendered table. --> <div class="table-toolbar"> <div class="filter-input-wrap"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/> </svg> <input type="text" id="variantFilter" placeholder="Filter by mutation (e.g. C49), variant ID, or GC range" /> <button type="button" class="filter-clear" id="filterClear" hidden aria-label="Clear filter">×</button> </div> <span class="table-count" id="tableCount"></span> </div> <div class="result-table-wrap"> <table class="result-table" id="resultTable"> <thead> <tr> <th class="sortable" data-sort="rank" title="Rank by predicted fitness (1 = best).">Rank <span class="sort-ind">↕</span></th> <th class="sortable" data-sort="mutations" title="Substitutions vs. the wild-type protein, in the format WT_aa-position-new_aa.">Mutations <span class="sort-ind">↕</span></th> <th class="num sortable" data-sort="fitness" title="Cumulative ΣΔLL from ESM-2: sum of log-likelihood improvements over WT across all substitutions in this variant.">Fitness <span class="sort-ind">↕</span></th> <th class="num sortable" data-sort="gc" title="GC content of the codon-optimized DNA. PCR-friendly range: 40–60%.">GC % <span class="sort-ind">↕</span></th> <th class="num sortable" data-sort="tm" title="Cooler of the two PCR primer Tm values (nearest-neighbor, standard salt). Annealing = Tm − 5°C for Q5/Phusion.">Tm (°C) <span class="sort-ind">↕</span></th> <th class="num sortable" data-sort="bp" title="Amplicon length in base pairs. Same for every variant in this library (length-preserving substitutions only).">bp <span class="sort-ind">↕</span></th> <th class="expand-col"></th> </tr> </thead> <tbody></tbody> </table> </div> <!-- Learning flywheel: log wet-lab results → propose a data-conditioned round 2 (Design→Build→Test→Learn). --> <section class="round2-panel" id="round2Panel" hidden> <header class="card-header"> <div class="card-header-left"> <p class="card-kicker">&sect; Learn from results</p> <h3>Tested these on the bench? Teach the engine.</h3> <p class="card-sub">Enter a measured value for the variants you assayed (any number &mdash; activity, expression, stability; higher = better). Leave the rest blank. TuringDNA fits a model on your results and proposes a smarter round&nbsp;2 &mdash; conditioned on your data, not just the prior.</p> </div> </header> <div class="round2-list" id="round2List"></div> <div class="round2-status" id="round2Status" hidden></div> <div class="round2-actions"> <button class="ghost" type="button" id="round2SaveBtn">Save results</button> <button class="primary" type="button" id="round2Btn">Propose round&nbsp;2 &rarr;</button> </div> </section> </section> </section> <!-- Library view. Was carrying the same step-num-done + decorative table SVG icon pattern as the Design cards, plus a redundant SVG icon on the Refresh button, plus another placeholder illustration in the empty state. All removed; pattern matches the Design view's § kicker treatment. Refresh is a text-only ghost button now. --> <!-- Library + History views removed 2026-05-27. Replaced by the per-user /dashboard/ page on the landing site (task #98). See sidebar comment above for context. --> <!-- ═════════════════════════════ CRISPR view (Cas9 knockout) ═══ Paste a gene → ranked SpCas9 sgRNAs with on-target scoring. Sign-in gated server-side; anonymous users see the same layout with the submit button disabled and a "Sign in to design guides" overlay. ════════════════════════════════════════════════════════ --> <section class="view view--crispr" data-view="crispr" hidden> <section class="hero" id="crisprHero"> <p class="hero-kicker">&sect; Begin &middot; CRISPR</p> <h1>Design a CRISPR edit.</h1> <p class="hero-lede"> Paste a gene or region. Get ranked sgRNAs for a SpCas9 / Cas12a knockout &mdash; or switch to <strong>base&nbsp;editing</strong> to install a precise C&rarr;T / A&rarr;G change (including premature-stop knockouts) with predicted amino-acid outcomes. Free for any account. If a project calls for an edit beyond what a variant library covers &mdash; a knockout, a precise base change &mdash; design it here, on the same construct. </p> <p class="hero-meta crispr-disclaimer"> On-target scoring is heuristic (Doench-style sequence features). <strong>Off-target risk is not assessed</strong> &mdash; for therapeutic or in-vivo applications, run your top guides through <a href="http://crispor.tefor.net/" target="_blank" rel="noopener">CRISPOR</a> before ordering. </p> </section> <section class="card" id="crisprInputCard"> <header class="card-header"> <div class="card-header-left"> <p class="card-kicker">&sect; 1 &middot; Target</p> <h2>Paste your DNA</h2> <p class="card-sub"> The gene or region you want to edit. ACGT only; FASTA headers OK; up to 1 Mbp. </p> </div> <button class="ghost" type="button" id="crisprExampleBtn" title="Loads the GFP coding sequence as a knockout target">Try an example</button> </header> <!-- Phase 3 (M2): paste-anything resolver. Type a gene symbol (TP53), an accession (ENST… / NM_…), or just paste DNA below. Resolving a symbol/accession fills the box and sets the gene context that base-edit amino-acid consequences and the structure view use. Only the (organism, identifier) is sent for lookups — a pasted sequence never leaves the Space. --> <div class="crispr-resolve-row"> <input id="crisprResolveInput" class="crispr-context-input crispr-resolve-input" type="text" maxlength="64" autocomplete="off" autocapitalize="characters" spellcheck="false" placeholder="Gene symbol (TP53), accession (ENST… / NM_…), or paste DNA below" /> <button id="crisprResolveBtn" type="button" class="ghost">Fetch</button> </div> <div class="crispr-resolve-chip" id="crisprResolveChip" hidden></div> <!-- Same line-numbered gutter pattern as the directed-evolution paste textarea (see #pasteGutter). Gutter spans render via app.js renderCrisprGutter() on every input event; scroll syncs both ways. --> <div class="paste-shell"> <div class="paste-gutter" id="crisprPasteGutter"><span>1</span></div> <textarea id="crisprInput" class="crispr-input" rows="9" spellcheck="false" wrap="off" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Paste DNA (ATGC…). FASTA headers and whitespace are OK."></textarea> </div> <!-- Enzyme picker — Phase 1. SpCas9 (NGG PAM, 20 nt spacer) is the default + most common. Cas12a (TTTV PAM, 23 nt spacer) added for AT-rich regions where Cas9 PAMs are sparse. Hidden controls — single line, mono labels, the same visual register as the cloning-designer enzyme picker on the directed-evolution side. --> <div class="crispr-enzyme-row"> <span class="crispr-enzyme-label">Nuclease</span> <label class="crispr-enzyme-opt"> <input type="radio" name="crisprEnzyme" value="cas9" checked /> <span>SpCas9 <em>· NGG PAM</em></span> </label> <label class="crispr-enzyme-opt"> <input type="radio" name="crisprEnzyme" value="cas12a" /> <span>Cas12a <em>· TTTV PAM</em></span> </label> </div> <!-- Phase 3 (M1): editing mode. Knockout = a Cas9 double-strand break repaired into frameshift indels (the default). Base edit = a precise single-base change (C→T via a cytosine base editor, A→G via an adenine base editor) with NO double-strand break — including premature-stop "CRISPR-STOP" knockouts. Base editing is SpCas9-only, so choosing it locks the nuclease. --> <div class="crispr-enzyme-row crispr-mode-row"> <span class="crispr-enzyme-label">Mode</span> <label class="crispr-enzyme-opt"> <input type="radio" name="crisprMode" value="knockout" checked /> <span>Knockout <em>· DSB + indels</em></span> </label> <label class="crispr-enzyme-opt"> <input type="radio" name="crisprMode" value="base_edit" /> <span>Base edit <em>· precise C&rarr;T / A&rarr;G</em></span> </label> </div> <!-- Base-editor picker — shown only in base-edit mode. Options come from /api/crispr/base-editors on first switch. The amino-acid consequence column fills in when a gene symbol (human/mouse) is given or the pasted sequence is a coding sequence (starts with ATG, ends in a stop). --> <div class="crispr-context-row crispr-be-row" id="crisprBaseEditorRow" hidden> <div class="crispr-context-field"> <label class="crispr-context-label" for="crisprBaseEditor"> Base editor <em>· cytosine or adenine</em> </label> <select id="crisprBaseEditor" class="crispr-context-input"></select> </div> <p class="crispr-be-note" id="crisprBaseEditorMeta"></p> </div> <!-- Phase 2B-1: organism + gene context. Both OPTIONAL — the tool works exactly as before if left blank. E. coli is the only off-target genome that's actually queryable on the free tier right now (lazy NCBI download, ~3 s); human / mouse are stubbed pending pre-built indexes in Phase 2B-2. Gene symbol activates Ensembl exon lookup ONLY for human / mouse. --> <div class="crispr-context-row"> <div class="crispr-context-field"> <label class="crispr-context-label" for="crisprOrganism"> Off-target genome <em>· optional</em> </label> <select id="crisprOrganism" class="crispr-context-input"> <option value="">None — skip genome search</option> <option value="ecoli">E. coli K-12 MG1655 · whole genome</option> <option value="human">Homo sapiens (GRCh38) · coding regions · first run takes ~1 min</option> <option value="mouse">Mus musculus (GRCm39) · coding regions · first run takes ~1 min</option> </select> </div> <div class="crispr-context-field"> <label class="crispr-context-label" for="crisprGeneSymbol"> Gene symbol <em>· optional, for exon context</em> </label> <input id="crisprGeneSymbol" class="crispr-context-input" type="text" maxlength="32" placeholder="e.g. TP53 (Ensembl lookup, human/mouse only)" autocapitalize="characters" autocomplete="off" spellcheck="false" /> </div> </div> <div class="paste-actions"> <span class="paste-stats" id="crisprInputStats">0 nt</span> <button id="crisprDesignBtn" type="button" class="primary primary-lg" disabled> <span class="primary-content"> <span class="primary-label">Design guides</span> <span class="primary-sub">Paste a sequence to enable</span> </span> </button> </div> <!-- Phase 2C-2: progress shell matching the directed- evolution pattern. Indeterminate (always-shimmering) because the CRISPR API is synchronous — we can't emit real percentage, but the moving stripe + status text reassures the user that the request is alive, especially during the ~60-90 s first build of the human off-target index. --> <div class="progress-shell crispr-progress" id="crisprProgressShell" hidden> <div class="progress-bar"> <div class="progress-fill progress-fill-indeterminate"></div> </div> <div class="progress-meta"> <span id="crisprProgressStatus">Designing…</span> <span id="crisprProgressElapsed">0.0s</span> </div> <div class="progress-message" id="crisprProgressMessage"></div> </div> <!-- The old inline #crisprSigninNotice was removed 2026-05-28 — replaced by the #crisprSigninModal which pops centered (better than a card that lives below the fold) and fires from BOTH the sidebar tab click AND the backend 403. --> </section> <!-- Results card — hidden until /api/crispr/design returns. --> <section class="card" id="crisprResultsCard" hidden> <header class="card-header results-header"> <div class="card-header-left"> <p class="card-kicker">&sect; 2 &middot; Guides</p> <h2>Ranked sgRNAs</h2> <p class="card-sub" id="crisprResultsSub">—</p> </div> <div class="results-actions"> <!-- Phase 3 (M4): save the current guide set to the signed-in user's library (45-day retention) and reopen past designs. --> <button id="crisprSaveBtn" type="button" class="ghost">Save design</button> <button id="crisprDesignsBtn" type="button" class="ghost">My designs</button> <!-- Live Collision IP Radar (opt-in, per run). Scans recent literature for the top guide's exact sequence. Only the gene + 20-mer leave the Space — never the full design. --> <button id="crisprRadarBtn" type="button" class="ghost" title="Scan recent literature & preprints for overlap with your top guide (sends the gene + 20-mer only)"> <span aria-hidden="true">⌖</span> IP radar </button> <div class="download-menu" id="crisprDownloadMenu"> <button id="crisprDownloadBtn" type="button" class="ghost download-trigger" aria-haspopup="true" aria-expanded="false"> Export <span class="caret">▾</span> </button> <div class="download-menu-items" id="crisprDownloadItems" hidden> <a class="download-item" data-format="csv">CSV</a> <a class="download-item" data-format="xlsx">Excel</a> </div> </div> </div> </header> <details class="how-to-read"> <summary>How to read this</summary> <div class="how-to-read-body"> <p><strong>Composite</strong> &mdash; the overall pick: on-target activity &times; (1 &minus; off-target penalty). <strong>On-target</strong> &mdash; predicted cut efficiency from Doench-style sequence features (1.0 = strong).</p> <p><strong>Self-off</strong> &mdash; worst CFD similarity to any other site <em>in the sequence you pasted</em> (0 = unique here). This is <strong>not</strong> a genome-wide check &mdash; run your top guides through CRISPOR before ordering.</p> <p><strong>KO score</strong> &mdash; probability the indel gives a true loss of function. <strong>FS %</strong> &mdash; fraction of predicted repair outcomes that frameshift. <strong>Dominance</strong> &mdash; how often the single most-likely repair outcome occurs (40%+ = clean).</p> <p><strong>Base-edit mode</strong> adds <strong>Editability</strong> (in-window editing activity), the predicted edit, and its amino-acid consequence.</p> </div> </details> <!-- Auto-generated run parameters + copy-paste methods paragraph. --> <div class="run-meta" id="crisprRunMeta" hidden></div> <!-- Live Collision IP Radar banner mounts here (above the results), populated by the radar button handler. --> <div id="crisprRadarBanner" class="ip-radar-wrap" hidden></div> <!-- Phase 2C-1: bulk-order strip. Click a vendor → copy all oligo pairs as TSV to clipboard + open vendor site so the user can paste into the order form. Vendor list comes from /api/crispr/vectors. Moved OUT of the header (2026-05-30) so it no longer squeezed the title into a one-word-per-line column — now a full-width strip above the cloning picker. --> <div class="crispr-vendor-row crispr-vendor-strip" id="crisprVendorRow" hidden></div> <!-- Phase 2C-1: vector picker. Above the table but inside the results card so the picker contextualizes the oligo columns. Picking a vector re-renders the Sense / Antisense columns with that vector's overhangs. --> <div class="crispr-vector-row" id="crisprVectorRow" hidden> <label class="crispr-vector-label" for="crisprVector"> Cloning vector </label> <select id="crisprVector" class="crispr-vector-select"></select> <span class="crispr-vector-meta" id="crisprVectorMeta"></span> </div> <div class="result-table-wrap"> <table class="result-table crispr-table"> <thead> <tr> <th class="rank-h">Rank</th> <th>Strand</th> <th class="num crispr-sortable" data-sort-key="position">Position</th> <th>Spacer</th> <th>PAM</th> <!-- Composite is the ranking column — on-target × (1 − CFD-penalty). Always the primary sort. --> <th class="num crispr-sortable" data-sort-key="composite_score" title="On-target × (1 − CFD off-target penalty). Click to sort.">Composite</th> <th class="num crispr-sortable" data-sort-key="on_target_score" title="TuringDNA on-target activity score (Doench-inspired sequence-only features). 1.0 = expected strong cut. Click to sort.">On-target</th> <!-- CFD-against-input is the Phase 1 differentiator. 0.00 = no other plausible cut site in the input (clean unique target). 1.00 = an identical 20-mer + NGG appears elsewhere — don't use this guide unless you want both cut. --> <th class="num crispr-sortable" data-sort-key="cfd_max_offtarget" title="Worst CFD score against any other NGG site in the pasted input. 0.00 = unique; 1.00 = exact repeat. Click to sort.">Self-off</th> <th class="num col-ko crispr-sortable" data-sort-key="ko_efficacy" title="Predicted probability the indel produces a true loss-of-function knockout. Click to sort.">KO score</th> <!-- Phase 2A: inDelphi-inspired prediction of the single most likely repair outcome at this cut, e.g. "-3 ATG (28%)" or "+1 T (32%)". The dominant outcome usually accounts for 15-40% of all repair events. --> <th class="col-ko" title="Single most-likely repair outcome (inDelphi-inspired). The number is the predicted frequency of THIS outcome among all repair events.">Top indel</th> <!-- Phase 2A: % of predicted repair outcomes that introduce a frameshift. Higher = more likely to produce a true loss-of-function allele. --> <th class="num col-ko crispr-sortable" data-sort-key="frameshift_pct" title="% of predicted repair outcomes that introduce a frameshift (non-multiple-of-3 indel). Higher = stronger KO likelihood. Click to sort.">FS %</th> <!-- Phase 2A: dominance of the SINGLE most-likely outcome, as a percent. Direct biological readout — "will I get one main edit product or many?" 40%+ = clean, 25-40% = typical, <25% = messy heterogeneous repair. --> <th class="num col-ko crispr-sortable" data-sort-key="top_dominance_pct" title="Frequency of the single most-likely repair outcome. 40%+ = clean; <25% = messy. Click to sort.">Dominance</th> <!-- Phase 2A: does the spacer's editing window (positions 4-8) hold a C or A? If yes, this guide could ALSO be used for a point edit via CBE or ABE base editors. --> <th class="col-ko" title="If the spacer's positions 4-8 hold a C or A, the same guide could be used for a point edit via cytosine (CBE) or adenine (ABE) base editor — not just a knockout.">Base editor</th> <!-- Phase 3 (M1) base-edit columns — shown only in Base edit mode. --> <th class="col-be" title="The single-base change(s) this editor installs inside its activity window, e.g. C5→T. Multiple targets = bystander edits.">Edit</th> <th class="num col-be crispr-sortable" data-sort-key="be_editability" title="Strongest in-window editing activity for a target base (0–1). Higher = more likely. Click to sort.">Editability</th> <th class="col-be" title="Amino-acid consequence of the edit when a reading frame is known (gene symbol given, or pasted sequence is a coding sequence). '* (stop gained)' = a DSB-free knockout via CRISPR-STOP.">AA change</th> <th class="col-be" title="A clean edit changes a single base in the window; a bystander edit hits more than one. 'STOP' marks guides that install a premature stop codon (knockout by base editing).">Outcome</th> <!-- Phase 2B-1: scored against the full chosen organism's genome (currently E. coli only on the free tier). Empty when no organism is picked; "unique" when the organism was searched and no real off-targets found. --> <th class="num" title="Worst CFD score against any site in the chosen organism's genome. 'unique' = clean (no real off-targets); 0.5+ = strong off-target that may cleave (look at the tooltip for location).">Genome off</th> <!-- Phase 2B-1: only populated when the user gave a gene symbol AND the input could be aligned to the gene's CDS. Shows exon number + splice/NMD warnings. --> <th title="Exon-number, splice-site proximity, and NMD-zone prediction (only when a gene symbol is provided). 'NMD likely' = the predicted PTC is >50 nt before the last exon-exon junction, triggering nonsense-mediated decay and guaranteeing a null protein.">Exon context</th> <!-- Phase 2C-1: annealable oligo pair for cloning into the chosen vector. Two columns so Sense and Antisense are side-by-side; each cell has a Copy button (single cell click → copy that strand only). --> <th title="Sense strand of the annealable oligo pair, ready to order from Twist/IDT and clone into the chosen vector after BsmBI/BbsI digestion.">Sense oligo</th> <th title="Antisense strand of the annealable oligo pair. Order alongside the sense strand, anneal, ligate.">Antisense oligo</th> <!-- Per-guide vendor buttons. Click → copies THIS guide's sense+antisense oligo pair to clipboard + opens vendor in a new tab. Mirrors the DE page's per-variant "Synthesize via X" row. --> <th title="Order this guide's oligo pair from a synthesis vendor. Click → copies the sense + antisense oligos to your clipboard, opens the vendor in a new tab. Paste into their bulk-oligo order form.">Order</th> <th class="num crispr-sortable" data-sort-key="gc_pct">GC%</th> <th>Flags</th> </tr> </thead> <tbody id="crisprTableBody"></tbody> </table> </div> </section> <!-- ===== LOG EDITING EFFICIENCY (feeds the cross-user on-target model) ===== --> <section class="card primer-design-card" id="crisprOutcomeCard" hidden> <div class="primer-results-head"> <span class="primer-results-title">Log editing efficiency</span> </div> <p class="field-hint">Tested these guides at the bench? Enter the measured editing efficiency (% edits / indels). Your guides stay private — only <strong>anonymous, aggregated</strong> patterns improve the on-target model for everyone.</p> <div class="ce-list" id="crisprOutcomeList"></div> <div class="primer-actions" style="display:flex;gap:12px;align-items:center;flex-wrap:wrap"> <button class="primary primary-lg" type="button" id="crisprOutcomeSave">Save results</button> <span class="round2-status" id="crisprOutcomeStatus" hidden></span> </div> </section> <!-- Lightweight in-card error banner — shown on validation errors (sequence too short, no PAM sites, etc.) without scrolling away. --> <div class="error-banner" id="crisprError" hidden></div> </section> <!-- ===================== PRIMER PICKER ===================== --> <section class="view view--primers" data-view="primers" hidden> <header class="view-head"> <h1 class="view-title"><em>Primer Analysis</em></h1> <p class="view-sub">Paste your candidate primers, BLAST them all in one go, and let the fitness model rank them — best amplification of your template, fewest off-target matches. No more BLASTing one primer at a time. Pairs well with Directed Evolution's output — check or refine the PCR primers for the variants you're ordering.</p> </header> <section class="card primer-input-card"> <label class="field-label" for="primerInput">Candidate primers</label> <p class="field-hint">One per line or FASTA. Optional names and forward/reverse tags (e.g. <code>GeneA_F</code> / <code>GeneA_R</code>) — pairs are auto-detected and scored as amplicons.</p> <textarea id="primerInput" class="primer-textarea mono" rows="6" spellcheck="false" placeholder=">GeneA_F&#10;ACAGTGACCTGAAGTCCATGC&#10;>GeneA_R&#10;TTGGCAGTCAACGTTACGGAC"></textarea> <label class="field-label" for="primerTemplate">Template to amplify <span class="field-opt">· optional, recommended</span></label> <p class="field-hint">The DNA region you want to amplify. Stays on our server — used to check each primer's binding site, uniqueness and the predicted amplicon size.</p> <textarea id="primerTemplate" class="primer-textarea mono" rows="4" spellcheck="false" placeholder="Paste the target DNA sequence (A/C/G/T)…"></textarea> <label class="primer-toggle"> <input type="checkbox" id="primerScanNcbi" /> <span class="primer-toggle-text"> <strong>Run specificity scan (in-silico PCR)</strong> <span class="field-hint">Searches the chosen genome and runs in-silico PCR to predict every product your primers would make — intended <em>and</em> off-target — right here, so you don't need a separate tool. Sequences go to NCBI BLAST (~1–3 min); leave off if your primers are confidential.</span> </span> </label> <div class="primer-organism-row" id="primerOrganismRow" hidden> <label class="field-label" for="primerOrganism">Check specificity against</label> <select id="primerOrganism" class="primer-select"> <option value="human" selected>Human — Homo sapiens</option> <option value="mouse">Mouse — Mus musculus</option> <option value="rat">Rat — Rattus norvegicus</option> <option value="zebrafish">Zebrafish — Danio rerio</option> <option value="yeast">Yeast — S. cerevisiae</option> <option value="ecoli">E. coli</option> <option value="all">All sequences (nt) — broad, noisier</option> </select> <label class="primer-subtoggle"> <input type="checkbox" id="primerStrict3p" /> <span>Strict 3′-end matching <span class="field-hint">Only count off-target sites whose <strong>last 5 bases match perfectly</strong> — the 3′ end that actually licenses extension. Fewer, higher-confidence predictions; leave off to also catch borderline sites.</span></span> </label> </div> <div class="primer-actions"> <button class="ghost" type="button" id="primerExample" title="Loads candidate GFP primers + a template to score">Try an example</button> <button class="primary primary-lg" type="button" id="primerAnalyze">Analyse primers</button> </div> <div class="error-banner" id="primerError" hidden></div> <div class="primer-warnings" id="primerWarnings" hidden></div> </section> <section class="card primer-results-card" id="primerResultsCard" hidden> <div class="primer-results-head"> <span class="primer-results-title">Ranked primers</span> <div class="primer-results-actions"> <div class="download-menu" id="primerDownloadMenu"> <button class="ghost download-trigger" type="button" id="primerDownloadBtn" aria-haspopup="true" aria-expanded="false">Export <span class="caret">▾</span></button> <div class="download-menu-items" id="primerDownloadItems" hidden> <a class="download-item" data-format="csv">CSV</a> <a class="download-item" data-format="xlsx">Excel</a> </div> </div> <button class="ghost" type="button" id="primerSaveBtn">Save</button> </div> </div> <details class="how-to-read"> <summary>How to read this</summary> <div class="how-to-read-body"> <p><strong>Fitness</strong> &mdash; the combined score used to rank your candidates (higher = better pick): Tm, GC, 3&prime;-end stability and specificity.</p> <p><strong>On template</strong> &mdash; whether the primer binds your template uniquely. <strong>Off-target products</strong> &mdash; extra amplicons in-silico PCR predicts beyond the intended one (0 = specific). <strong>Tm</strong> &mdash; nearest-neighbor melting temp; aim for a matched pair.</p> <p class="how-to-read-note">These primers are yours &mdash; TuringDNA scores and ranks them; it doesn&rsquo;t invent them.</p> </div> </details> <!-- Auto-generated run parameters + copy-paste methods paragraph. --> <div class="run-meta" id="primerRunMeta" hidden></div> <div class="primer-scan-status" id="primerScanStatus" hidden></div> <div class="primer-best" id="primerBest"></div> <div class="primer-amplicons" id="primerAmplicons"></div> <div class="primer-products" id="primerProducts"></div> <div class="primer-list" id="primerList"></div> <p class="primer-foot">The specificity scan runs full in-silico PCR against your chosen genome — the same check NCBI Primer-BLAST performs — so the result is complete here. Predictions are a strong guide; as always, validate critical results at the bench.</p> </section> <!-- ============== DE NOVO PRIMER DESIGN ============== --> <section class="card primer-design-card" id="primerDesignCard"> <div class="primer-results-head"> <span class="primer-results-title">Design primers from a template</span> <button class="ghost" type="button" id="designExample" title="Load an example template">Try an example</button> </div> <p class="field-hint">Paste the DNA you want to amplify (and, optionally, the region the product must span). TuringDNA designs Tm-matched forward/reverse pairs entirely on-server — no NCBI, nothing leaves.</p> <label class="field-label" for="designTemplate">Template &middot; DNA or FASTA</label> <textarea id="designTemplate" class="primer-textarea mono" rows="4" spellcheck="false" placeholder="Paste DNA (A/C/G/T) or a FASTA record…"></textarea> <div class="design-opts"> <label class="design-opt">Target start<input type="number" id="designTargetStart" min="1" placeholder="optional" /></label> <label class="design-opt">Target end<input type="number" id="designTargetEnd" min="1" placeholder="optional" /></label> <label class="design-opt">Product min (bp)<input type="number" id="designProductMin" min="40" value="100" /></label> <label class="design-opt">Product max (bp)<input type="number" id="designProductMax" min="50" value="1000" /></label> </div> <div class="primer-actions"> <button class="primary primary-lg" type="button" id="designBtn">Design primers</button> </div> <div class="error-banner" id="designError" hidden></div> <div class="primer-warnings" id="designWarnings" hidden></div> <div class="design-results" id="designResults" hidden></div> <div class="design-gel gel" id="designGel" hidden></div> </section> <!-- ============== MULTIPLEX COMPATIBILITY ============== --> <section class="card primer-design-card" id="primerMultiplexCard"> <div class="primer-results-head"> <span class="primer-results-title">Multiplex compatibility check</span> </div> <p class="field-hint">Paste all the primers you want to run in one tube. We flag 3&prime; cross-dimers between any two of them, and amplicon sizes too close to resolve on a gel.</p> <label class="field-label" for="mpxInput">Primers &middot; FASTA or one per line</label> <textarea id="mpxInput" class="primer-textarea mono" rows="5" spellcheck="false" placeholder=">F1&#10;ACGT…&#10;>R1&#10;ACGT…"></textarea> <label class="field-label" for="mpxSizes">Expected product sizes (bp, optional)</label> <input id="mpxSizes" class="primer-textarea mono" style="min-height:40px;font-size:16px" placeholder="e.g. 320, 540, 900" /> <div class="primer-actions"> <button class="primary primary-lg" type="button" id="mpxBtn">Check multiplex</button> </div> <div class="error-banner" id="mpxError" hidden></div> <div class="design-results" id="mpxResults" hidden></div> </section> <!-- ====== LOCAL SPECIFICITY (in-silico PCR vs a genome) ====== --> <section class="card primer-design-card" id="primerLocalSpecCard"> <div class="primer-results-head"> <span class="primer-results-title">Specificity vs. your own genome</span> </div> <p class="field-hint">In-silico PCR against a genome/FASTA you upload &mdash; the same check as the NCBI scan, but it runs <strong>on our server</strong>, so your primers never leave, and it works for any organism (incl. non-model). Up to ~12&nbsp;Mb.</p> <label class="field-label" for="lspecInput">Primers &middot; FASTA or one per line</label> <textarea id="lspecInput" class="primer-textarea mono" rows="4" spellcheck="false" placeholder=">F1&#10;ACGT…&#10;>R1&#10;ACGT…"></textarea> <label class="field-label" for="lspecFasta">Genome / FASTA to scan</label> <textarea id="lspecFasta" class="primer-textarea mono" rows="4" spellcheck="false" placeholder="Paste a FASTA genome, or upload a file below…"></textarea> <div class="primer-actions" style="gap:10px;align-items:center;display:flex;flex-wrap:wrap"> <input type="file" id="lspecFile" accept=".fa,.fasta,.fna,.txt" class="lspec-file" /> <button class="primary primary-lg" type="button" id="lspecBtn">Run specificity</button> </div> <div class="error-banner" id="lspecError" hidden></div> <div class="design-results" id="lspecResults" hidden></div> <div class="design-gel gel" id="lspecGel" hidden></div> </section> <!-- ===== LOG AMPLIFICATION RESULT (feeds the cross-user primer model) ===== --> <section class="card primer-design-card" id="primerOutcomeCard"> <div class="primer-results-head"> <span class="primer-results-title">Log amplification result</span> </div> <p class="field-hint">Ran a PCR with these primers? Tell us if it amplified. Only <strong>anonymous, aggregated</strong> patterns (Tm/GC/3&prime;-end buckets) improve the model — your primers stay private.</p> <div class="design-opts"> <label class="design-opt" style="flex:1;min-width:220px">Forward primer<input type="text" id="poFwd" placeholder="5'→3'" /></label> <label class="design-opt" style="flex:1;min-width:220px">Reverse primer<input type="text" id="poRev" placeholder="5'→3'" /></label> <label class="design-opt">Result <select id="poResult" class="design-opt-select"> <option value="1">Amplified cleanly</option> <option value="0.5">Partial / weak</option> <option value="0">Failed</option> </select> </label> </div> <div class="primer-actions" style="display:flex;gap:12px;align-items:center;flex-wrap:wrap"> <button class="primary primary-lg" type="button" id="poSave">Save result</button> <span class="round2-status" id="poStatus" hidden></span> </div> </section> </section> <!-- ===================== PLASMID STUDIO ===================== --> <section class="view view--plasmid" data-view="plasmid" hidden> <header class="view-head"> <h1 class="view-title"><em>Plasmid Editor</em></h1> <p class="view-sub">Import a GenBank or FASTA record (or paste raw DNA), see the annotated circular &amp; linear map, run restriction analysis across 1,000+ enzymes, simulate a digest with a virtual gel, and save constructs to your library. Often the next stop after Directed Evolution &mdash; bring a designed insert here to map it, check the digest, and get it synthesis-ready.</p> </header> <section class="card plasmid-input-card" id="plasmidInputCard"> <div class="plasmid-input-head"> <label class="field-label" for="plasmidInput">Sequence · GenBank / FASTA / SnapGene .dna / raw DNA</label> <div class="plasmid-input-actions"> <button class="ghost" type="button" id="plasmidLibraryBtn">My plasmids</button> <button class="ghost" type="button" id="plasmidExample" title="Loads a demo construct with real promoters, an AmpR gene and cut sites">Try an example</button> </div> </div> <textarea id="plasmidInput" class="primer-textarea mono" rows="6" spellcheck="false" placeholder="Paste a GenBank record (LOCUS…), a FASTA (&gt;name), or raw DNA…"></textarea> <div class="plasmid-input-row"> <label class="plasmid-file-btn"> Upload file<input type="file" id="plasmidFile" accept=".dna,.gb,.gbk,.genbank,.fasta,.fa,.fna,.txt,.seq" hidden /> </label> <div class="plasmid-topo"> <span class="field-hint">Topology (raw/FASTA):</span> <label><input type="radio" name="plasmidTopo" value="circular" checked /> Circular</label> <label><input type="radio" name="plasmidTopo" value="linear" /> Linear</label> </div> <button class="primary primary-lg" type="button" id="plasmidImport">Import &amp; map</button> </div> <div class="error-banner" id="plasmidError" hidden></div> </section> <!-- Workbench "home" strip (2026-06-04). The Plasmid Editor is the hub: from a loaded construct you can stay here to map & cut, or hand a region to the other three tools. Type-led, editorial — NOT a SaaS card grid (see the nav comment). Hidden by showResults() once a construct is loaded. --> <section class="workbench-home" id="workbenchHome"> <p class="card-kicker">&sect; One workbench</p> <p class="workbench-lede">Your construct is the centre of gravity. Import it above to map and cut it here &mdash; then, without leaving your sequence, hand any region to the other tools.</p> <nav class="workbench-links" aria-label="What you can do from your construct"> <a class="workbench-link" id="wbToImport" href="#plasmid"> <strong>Map &amp; cut</strong> <span>annotate &middot; restriction across 1,000+ enzymes &middot; virtual gel &middot; Gibson / Golden&nbsp;Gate / restriction cloning</span> </a> <a class="workbench-link" href="#crispr"> <strong>Design CRISPR guides</strong> <span>Cas9 knockout &amp; base editing, with off-target and knockout scoring</span> </a> <a class="workbench-link" href="#primers"> <strong>Analyse primers</strong> <span>in-silico PCR, specificity and Tm &mdash; ranks your candidate pairs</span> </a> <a class="workbench-link" href="#design"> <strong>Evolve a CDS</strong> <span>ESM-2 zero-shot variant library, codon-optimized and synthesis-ready</span> </a> </nav> </section> <section class="card plasmid-results-card" id="plasmidResultsCard" hidden> <div class="plasmid-toolbar"> <div class="plasmid-title-wrap"> <input id="plasmidName" class="plasmid-name-input" type="text" maxlength="120" /> <span class="plasmid-meta" id="plasmidMeta"></span> </div> <div class="plasmid-toolbar-actions"> <div class="plasmid-viewtoggle" role="tablist"> <button class="pv-tab pv-tab-active" id="pvCircular" type="button">Circular</button> <button class="pv-tab" id="pvLinear" type="button">Linear</button> <button class="pv-tab" id="pvSequence" type="button">Sequence</button> </div> <button class="ghost" type="button" id="plasmidSave">Save</button> <div class="plasmid-use"> <button class="ghost" type="button" id="plasmidUseBtn">Use in ▾</button> </div> <div class="plasmid-export"> <button class="ghost" type="button" id="plasmidExportGb">GenBank ▾</button> </div> </div> </div> <!-- Sequence editor toolbar (shown only in Sequence view) --> <div class="plasmid-seq-tools" id="plasmidSeqTools" hidden> <div class="seqtool-row"> <div class="seqtool-find"> <input type="text" id="plasmidFind" class="seqtool-input mono" placeholder="Find sequence (ACGT)…" spellcheck="false" /> <button class="ghost" type="button" id="plasmidFindPrev" title="Previous match">‹</button> <button class="ghost" type="button" id="plasmidFindNext" title="Next match">›</button> <span class="seqtool-count" id="plasmidFindCount"></span> </div> <div class="seqtool-sel"> <label>From <input type="number" id="plasmidSelFrom" class="seqtool-num" min="1" /></label> <label>To <input type="number" id="plasmidSelTo" class="seqtool-num" min="1" /></label> <span class="seqtool-sellen" id="plasmidSelLen"></span> </div> </div> <div class="seqtool-row seqtool-ops"> <button class="ghost" type="button" id="seqCopy">Copy</button> <button class="ghost" type="button" id="seqCopyRC">Copy rev-comp</button> <button class="ghost" type="button" id="seqTranslate">Translate</button> <button class="ghost" type="button" id="seqAnnotate">Annotate…</button> <button class="ghost" type="button" id="seqDelete">Delete</button> <button class="ghost" type="button" id="seqInsert">Insert…</button> <button class="ghost" type="button" id="seqRevComp" title="Reverse-complement the whole plasmid">Rev-comp all</button> <span class="seqtool-divider"></span> <button class="ghost" type="button" id="seqToCrispr" title="Design CRISPR guides against the selected region">→ CRISPR</button> <button class="ghost" type="button" id="seqToPrimers" title="Use the selected region as the Primer Analysis template">→ Primers</button> <button class="ghost" type="button" id="seqToEvolve" title="Evolve the selected CDS in Directed Evolution">→ Evolve</button> </div> <div class="seqtool-output" id="plasmidSeqOutput" hidden></div> </div> <!-- Auto-generated construct summary + copy-paste methods paragraph. --> <div class="run-meta" id="plasmidRunMeta" hidden></div> <div class="plasmid-layout"> <div class="plasmid-map-wrap" id="plasmidMapWrap"><!-- SVG map injected --></div> <div class="plasmid-side"> <h3 class="primer-sec-title">Features</h3> <div class="plasmid-feature-list" id="plasmidFeatures"></div> </div> </div> <!-- Restriction analysis + digest --> <div class="plasmid-enzymes"> <h3 class="primer-sec-title">Restriction analysis</h3> <p class="field-hint" id="plasmidEnzymeHint">Tap enzymes to show their cut sites on the map; pick a few and digest to size the fragments.</p> <div class="plasmid-enzyme-grid" id="plasmidEnzymeGrid"></div> <div class="plasmid-digest-actions"> <button class="ghost" type="button" id="plasmidDigestBtn">Digest selected →</button> <button class="plasmid-clear-enz" type="button" id="plasmidClearEnz">Clear</button> </div> <div class="plasmid-gel-wrap" id="plasmidGel" hidden></div> </div> <p class="primer-foot" id="plasmidFoot">Restriction sites from Biopython/REBASE (1,000+ enzymes), circular-aware. Auto-annotation flags ORFs + common motifs; GenBank features are kept as-is.</p> </section> <!-- Pairwise sequence alignment --> <section class="card plasmid-align-card"> <div class="clone-head"> <h2 class="clone-title">Align two sequences</h2> <div class="clone-methods" role="tablist"> <button class="clone-method clone-method-active" data-align-mode="global" type="button">Global</button> <button class="clone-method" data-align-mode="local" type="button">Local</button> </div> </div> <p class="field-hint">Compare two DNA or protein sequences — percent identity, mismatches and gaps. <strong>Global</strong> aligns end-to-end (Needleman–Wunsch); <strong>Local</strong> finds the best shared region (Smith–Waterman).</p> <div class="align-inputs"> <textarea id="alignA" class="primer-textarea mono" rows="3" spellcheck="false" placeholder="Sequence A — ACGT… or protein"></textarea> <textarea id="alignB" class="primer-textarea mono" rows="3" spellcheck="false" placeholder="Sequence B"></textarea> </div> <div class="align-actions"> <button class="primary" type="button" id="alignRun">Align</button> <span class="align-stats" id="alignStats"></span> </div> <div class="align-output" id="alignOutput" hidden></div> </section> <!-- Cloning / assembly --> <section class="card plasmid-clone-card"> <div class="clone-head"> <h2 class="clone-title">Clone &amp; assemble</h2> <div class="clone-methods" role="tablist"> <button class="clone-method clone-method-active" data-method="gibson" type="button">Gibson / overlap</button> <button class="clone-method" data-method="golden_gate" type="button">Golden Gate</button> <button class="clone-method" data-method="restriction" type="button">Restriction</button> </div> </div> <!-- Gibson / Golden Gate: fragment list --> <div class="clone-pane" id="clonePaneFragments"> <p class="field-hint" id="cloneFragHint">Paste your fragments — FASTA, or one per line as <code>name: SEQUENCE</code>. Overlapping ends assemble scarlessly; bare junctions get homology arms designed into the primers.</p> <textarea id="cloneFragments" class="primer-textarea mono" rows="6" spellcheck="false" placeholder=">backbone&#10;ACGT…&#10;>insert&#10;TTGG…"></textarea> <div class="clone-opts"> <button class="ghost" type="button" id="cloneUseCurrent">+ Use current plasmid</button> <label class="clone-circ" id="cloneCircWrap"><input type="checkbox" id="cloneCircular" checked /> Circular product</label> <label class="clone-gg-enz" id="cloneGgEnzWrap" hidden>Enzyme <select id="cloneGgEnzyme" class="seqtool-num" style="width:auto"> <option value="BsaI">BsaI</option> <option value="BbsI">BbsI</option> <option value="BsmBI">BsmBI</option> </select> </label> </div> </div> <!-- Restriction: vector + insert --> <div class="clone-pane" id="clonePaneRestriction" hidden> <label class="field-label" for="cloneVector">Vector (cut once by the enzyme)</label> <textarea id="cloneVector" class="primer-textarea mono" rows="3" spellcheck="false" placeholder="Vector DNA…"></textarea> <label class="field-label" for="cloneInsert">Insert (flanked by the same enzyme)</label> <textarea id="cloneInsert" class="primer-textarea mono" rows="3" spellcheck="false" placeholder="Insert DNA…"></textarea> <div class="clone-opts"> <label>Enzyme <input type="text" id="cloneReEnzyme" class="seqtool-num" style="width:90px" value="EcoRI" /></label> <label class="clone-circ"><input type="checkbox" id="cloneVecCirc" checked /> Vector is circular</label> </div> </div> <div class="clone-actions"> <button class="primary primary-lg" type="button" id="cloneRun">Assemble →</button> </div> <div class="error-banner" id="cloneError" hidden></div> <div class="clone-result" id="cloneResult" hidden></div> </section> <!-- ===== LOG CLONING RESULT (feeds the cross-user assembly model) ===== --> <section class="card primer-design-card" id="cloneOutcomeCard"> <div class="primer-results-head"> <span class="primer-results-title">Log cloning result</span> </div> <p class="field-hint">Did your assembly work at the bench? Logging it teaches the model which methods/junctions succeed. Only <strong>anonymous, aggregated</strong> patterns are kept.</p> <div class="design-opts"> <label class="design-opt">Method <select id="coMethod" class="design-opt-select"> <option value="gibson">Gibson</option> <option value="goldengate">Golden Gate</option> <option value="restriction">Restriction</option> <option value="gateway">Gateway</option> </select> </label> <label class="design-opt">Fragments<input type="number" id="coFrags" min="1" max="20" value="2" /></label> <label class="design-opt">Overlap (bp)<input type="number" id="coOverlap" min="0" max="120" value="25" /></label> <label class="design-opt">Result <select id="coResult" class="design-opt-select"> <option value="1">Assembled</option> <option value="0.5">Partial</option> <option value="0">Failed</option> </select> </label> </div> <div class="primer-actions" style="display:flex;gap:12px;align-items:center;flex-wrap:wrap"> <button class="primary primary-lg" type="button" id="coSave">Save result</button> <span class="round2-status" id="coStatus" hidden></span> </div> </section> <!-- Library modal --> <div class="modal" id="plasmidLibraryModal" hidden role="dialog" aria-modal="true"> <div class="modal-backdrop" data-plasmid-lib-close></div> <div class="modal-panel" role="document"> <header class="modal-header"> <div><p class="modal-sub">&sect; Library</p><h2>My plasmids</h2></div> <button class="modal-close" aria-label="Close" data-plasmid-lib-close>&times;</button> </header> <div class="modal-body"><div id="plasmidLibraryList" class="plasmid-lib-list"></div></div> </div> </div> </section> <section class="view view--docs" data-view="docs" hidden> <section class="card docs-card"> <header class="card-header"> <div class="card-header-left"> <p class="card-kicker">&sect; Documentation</p> <h2>How TuringDNA works</h2> <p class="card-sub">Four tools, one workbench — what each does, what to trust, how to cite it.</p> </div> </header> <div class="docs-body"> <section> <h3>Overview</h3> <p>TuringDNA is an integrated molecular-biology workbench built around your construct. The <strong>Plasmid Editor</strong> is the hub: import a sequence, then design CRISPR edits, analyse primers, or evolve a coding region on it — without leaving your sequence. Four tools, one workspace.</p> <p>Your individual sequences stay private — never shared, exposed, or reproduced, and they only leave this machine on the explicit opt-in network steps listed below. Only anonymous, aggregated signals improve our models (<a href="https://turingdna.com/privacy/" target="_blank" rel="noopener">Privacy Policy</a>).</p> </section> <section> <h3>Plasmid Editor</h3> <p>Import and work with circular or linear constructs end to end.</p> <ul class="docs-list"> <li><strong>Import.</strong> GenBank · FASTA · EMBL · SnapGene-style features · raw DNA. Annotations are read from the record where present.</li> <li><strong>Maps &amp; editing.</strong> Annotated circular and linear maps, plus a sequence view with feature colouring, find, translate, reverse-complement and in-place editing.</li> <li><strong>Restriction.</strong> Scans the REBASE enzyme set (1,000+ enzymes), separates cutters from non-cutters, and simulates a digest on a virtual agarose gel.</li> <li><strong>Cloning.</strong> Simulates Gibson assembly, Golden Gate, and restriction-ligation — junctions, fragment order, and the assembled product.</li> <li><strong>Export.</strong> GenBank or FASTA; save constructs to your per-user library for 45 days.</li> </ul> <p class="docs-callout">Cloning and digests are <strong>in-silico predictions</strong>. Confirm overhangs, junctions and orientation before you commit reagents.</p> </section> <section> <h3>CRISPR</h3> <p>Design SpCas9 guide RNAs against a pasted region (or a gene resolved by symbol/accession) — for knockout or base editing.</p> <ul class="docs-list"> <li><strong>Guides.</strong> Every NGG-PAM 20-mer with an on-target activity score (Doench-style sequence features), strand and position.</li> <li><strong>Off-target.</strong> CFD scoring (Doench 2016) against other sites in the input. Base-edit mode adds CBE/ABE windows, the predicted edit, the amino-acid consequence, bystander flags and CRISPR-STOP knockouts.</li> <li><strong>Knockout.</strong> Predicted indel spectrum, frameshift %, out-of-frame dominance, and a loss-of-function likelihood.</li> <li><strong>Cloning oligos.</strong> Ready-to-order sense/antisense pairs for the standard vectors (BbsI/BsmBI; Cas12a geometry), copied straight to a vendor order.</li> </ul> <p class="docs-callout">Off-target search covers only the sequence you provide — it is <strong>not</strong> a whole-genome scan. Run your top guides through a genome-wide tool (e.g. CRISPOR) before ordering.</p> </section> <section> <h3>Primer Analysis</h3> <p>Bring your <em>candidate</em> primers; TuringDNA evaluates and ranks them — it does not invent primers from scratch.</p> <ul class="docs-list"> <li><strong>Scoring.</strong> Nearest-neighbor Tm (SantaLucia), GC content, 3′-end stability, and hairpin / self-dimer heuristics for every primer.</li> <li><strong>In-silico PCR.</strong> Binds each pair against your template and reports the intended amplicon plus any off-target products and their sizes.</li> <li><strong>Specificity (opt-in).</strong> Checks candidates against NCBI nt and separates intended from off-target hits.</li> <li><strong>Ranking.</strong> Combines the above into a recommended pair — no BLASTing one primer at a time.</li> </ul> </section> <section> <h3>Directed Evolution</h3> <p>Design a smart mutation library for an existing protein using ESM-2 zero-shot scoring. Provide a wild-type sequence (or send a CDS from the Plasmid Editor); receive a library of multi-mutant variants ranked by predicted evolutionary fitness, codon-optimized for your host, ready to order.</p> <p>This is <strong>not</strong> de novo protein design. It's directed-evolution library generation: improving an existing protein along an existing axis (stability, expression, mild activity tuning).</p> <ol class="docs-list"> <li><strong>Parse &amp; translate.</strong> FASTA · SnapGene · GenBank · EMBL · raw DNA · raw protein. Plasmid files surface a CDS picker; raw DNA with multiple stops triggers 6-frame ORF discovery.</li> <li><strong>Zero-shot scoring.</strong> ESM-2 computes ΔLL = log P(mutant | x_WT) − log P(WT | x_WT) for every position × 19 substitutions (Meier et al. 2021 wild-type marginal scheme).</li> <li><strong>Combinatorial search.</strong> Simulated annealing over the top-percentile pool of single-site mutations. Multiple restarts; cumulative ΣΔLL as fitness; stop-codon and duplicate-position penalties.</li> <li><strong>Codon optimization.</strong> Reverse-translate with a host codon-usage table. Synonymously scrub BsaI / BsmBI / NotI sites for Golden Gate compatibility.</li> </ol> <table class="docs-table"> <tr><th>Mutations / variant</th><th>Approx. functional retention</th></tr> <tr><td>1–2</td><td>70–85%</td></tr> <tr><td>3–4</td><td>50–70%</td></tr> <tr><td>5–6</td><td>30–55%</td></tr> <tr><td>7–8</td><td>15–40%</td></tr> <tr><td>9+</td><td>&lt; 25%</td></tr> </table> <p class="docs-callout">Stay shallow. Cap <code>Max mutations / variant</code> at 3–4 unless you have a structural reason. Screen, don't trust.</p> <p><strong>What ESM-2 sees:</strong> evolutionary plausibility from ~65 M UniRef50 sequences — conservation, coevolution, sequence context. <strong>What it can't see:</strong> structure explicitly, rare-but-essential active-site roles, epistasis between selected mutations; membrane proteins, IDPs and multi-domain assemblies are weakest.</p> <p><strong>Filter syntax</strong> (variant table): <code>C49</code> = variants mutating residue 49 · <code>W58L</code> = exactly that substitution · <code>gc&gt;50</code>, <code>tm&gt;58</code>, <code>fitness&gt;2</code>, <code>bp&lt;800</code> = numeric ranges.</p> </section> <section> <h3>What runs locally vs over the network</h3> <ul class="docs-list"> <li><strong>Local:</strong> plasmid parsing, annotation, restriction &amp; cloning simulation; CRISPR design, CFD off-target and oligo generation; primer scoring and in-silico PCR; ESM-2 inference, simulated annealing and codon optimization; all CSV / Excel / GenBank / FASTA export. Sequences never leave this machine for these steps.</li> <li><strong>Opt-in network:</strong> NCBI BLAST (sequence identification and primer specificity — sends that sequence to NCBI); AlphaFold-DB / ESMFold structure embeds; Europe PMC literature lookup (IP Radar); synthesis-vendor redirects. Each is explicit and off by default.</li> </ul> </section> <section> <h3>Citations</h3> <p class="docs-citation">Meier et al. (2021). Language models enable zero-shot prediction of the effects of mutations on protein function. <cite>NeurIPS</cite> 34.</p> <p class="docs-citation">Lin et al. (2023). Evolutionary-scale prediction of atomic-level protein structure. <cite>Science</cite> 379:1123–1130.</p> <p class="docs-citation">Doench et al. (2016). Optimized sgRNA design to maximize activity and minimize off-target effects of CRISPR-Cas9. <cite>Nat. Biotechnol.</cite> 34:184–191.</p> <p class="docs-citation">Hsu et al. (2013). DNA targeting specificity of RNA-guided Cas9 nucleases. <cite>Nat. Biotechnol.</cite> 31:827–832.</p> <p class="docs-citation">Komor et al. (2016) &amp; Gaudelli et al. (2017). Programmable base editing of C·G and A·T pairs. <cite>Nature</cite> 533:420 / 551:464.</p> <p class="docs-citation">Allawi &amp; SantaLucia (1997). Thermodynamics and NMR of internal G·T mismatches in DNA. <cite>Biochemistry</cite> 36:10581–10594.</p> </section> <section> <h3>Licenses of bundled components</h3> <ul class="docs-list"> <li>ESM-2 weights — MIT (Meta/FAIR)</li> <li>Transformers, Accelerate — Apache 2.0 (Hugging Face)</li> <li>PyTorch — BSD-style (Meta)</li> <li>Biopython (parsing, restriction, Tm) — BSD-derived</li> <li>Mol* viewer — MIT (PDBe / RCSB)</li> <li>Inter, JetBrains Mono — SIL Open Font License</li> <li>Lucide icons — ISC</li> </ul> </section> </div> </section> </section> </div> <footer> <span class="footer-note">TuringDNA v0.1 &middot; individual sequences kept private &middot; <a href="https://turingdna.com/privacy/" target="_blank" rel="noopener">Privacy</a> &middot; <a href="https://turingdna.com/terms/" target="_blank" rel="noopener">Terms</a></span> </footer> </main> </div> <!-- CRISPR sign-in modal — fires when an anonymous user clicks the CRISPR sidebar tab OR when the backend returns 403 signin_required (e.g., expired JWT). Same .modal / .modal-panel-narrow infrastructure as the BLAST consent modal — centered overlay, dismissable, doesn't depend on scroll position. --> <div class="modal modal--sheet" id="crisprSigninModal" hidden role="dialog" aria-labelledby="crisprSigninTitle" aria-modal="true"> <div class="modal-backdrop" data-crispr-signin-close></div> <div class="modal-panel modal-panel-narrow" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Sign in</p> <h2 id="crisprSigninTitle">These tools are members-only.</h2> </div> <button class="modal-close" aria-label="Close" data-crispr-signin-close>&times;</button> </header> <div class="modal-body"> <p> Don't miss out &mdash; the <strong>CRISPR designer</strong>, <strong>Primer Analysis</strong>, and the <strong>Plasmid Editor</strong> are free for anyone with an account. Design, analyse, export any time, and save your designs and plasmids for <strong>45 days</strong>. </p> <p> No card, no spam, takes ten seconds. <span style="white-space:nowrap;">:))</span> </p> <div class="blast-consent-actions"> <button class="ghost" type="button" data-crispr-signin-close>Maybe later</button> <a class="primary" href="https://turingdna.com/signup/?from=crispr" target="_top" id="crisprSigninCreate">Create free account</a> <a class="ghost" href="https://turingdna.com/signin/?from=crispr" target="_top" id="crisprSigninExisting">I already have one</a> </div> </div> </div> </div> <!-- Phase 3 (M5): CRISPR structure viewer. Opens from the "why this guide" panel when a gene context exists. Shows the gene's AlphaFold-DB model (via the Mol* viewer already loaded for the directed-evolution page) with the Cas9 cut-site residue focused + highlighted. --> <div class="modal" id="crisprStructureModal" hidden role="dialog" aria-labelledby="crisprStructureTitle" aria-modal="true"> <div class="modal-backdrop" data-crispr-struct-close></div> <div class="modal-panel" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Structure</p> <h2 id="crisprStructureTitle">Cut site on the protein</h2> <p class="modal-sub" id="crisprStructureMeta">&mdash;</p> </div> <button class="modal-close" aria-label="Close" data-crispr-struct-close>&times;</button> </header> <div class="modal-body"> <div class="alphafold-viewer crispr-structure-viewer" id="crisprStructureViewer"> <div class="alphafold-loading">Loading AlphaFold-DB structure&hellip;</div> </div> <p class="alphafold-disclaimer" id="crisprStructureDisclaimer"> Predicted structure from AlphaFold-DB. The highlighted residue is the Cas9 cut site mapped through the coding sequence &mdash; an approximate location, not experimentally determined. </p> </div> </div> </div> <!-- Phase 3 (M4): saved-designs list. Opens from "My designs"; click a row to reopen that guide set in the table. --> <div class="modal" id="crisprDesignsModal" hidden role="dialog" aria-labelledby="crisprDesignsTitle" aria-modal="true"> <div class="modal-backdrop" data-crispr-designs-close></div> <div class="modal-panel modal-panel-narrow" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Library</p> <h2 id="crisprDesignsTitle">My saved designs</h2> <p class="modal-sub">Kept for 45 days. Click one to reopen it.</p> </div> <button class="modal-close" aria-label="Close" data-crispr-designs-close>&times;</button> </header> <div class="modal-body"> <div id="crisprDesignsList" class="crispr-designs-list"> <p class="muted">Loading…</p> </div> </div> </div> </div> <!-- Unified saved-work hub (2026-06-05). One panel listing everything the signed-in user has saved across all four tools, each reopenable — replaces the per-tool "My plasmids" list and the CRISPR-only "My designs". Sections lazy-load in parallel; each degrades independently. --> <div class="modal" id="savedModal" hidden role="dialog" aria-labelledby="savedTitle" aria-modal="true"> <div class="modal-backdrop" data-saved-close></div> <div class="modal-panel" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Library</p> <h2 id="savedTitle">My designs</h2> <p class="modal-sub">Everything you&rsquo;ve saved &mdash; kept for 45 days. Click one to reopen it.</p> </div> <button class="modal-close" aria-label="Close" data-saved-close>&times;</button> </header> <div class="modal-body saved-body"> <section class="saved-section"> <h3 class="saved-sec-title">Plasmids</h3> <div id="savedPlasmids" class="saved-list"><p class="muted">Loading…</p></div> </section> <section class="saved-section"> <h3 class="saved-sec-title">CRISPR designs</h3> <div id="savedCrispr" class="saved-list"><p class="muted">Loading…</p></div> </section> <section class="saved-section"> <h3 class="saved-sec-title">Primer sets</h3> <div id="savedPrimers" class="saved-list"><p class="muted">Loading…</p></div> </section> <section class="saved-section"> <h3 class="saved-sec-title">Evolution libraries</h3> <div id="savedLibraries" class="saved-list"><p class="muted">Loading…</p></div> </section> </div> </div> </div> <!-- "Start here" goal router (2026-06-05). Shown once after the first-use disclaimer and re-openable from the sidebar — orients a newcomer to the right tool by goal. Editorial + dismissible, never a blocker. --> <div class="modal" id="startHereModal" hidden role="dialog" aria-labelledby="startHereTitle" aria-modal="true"> <div class="modal-backdrop" data-starthere-close></div> <div class="modal-panel" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Start here</p> <h2 id="startHereTitle">What are you working on?</h2> <p class="modal-sub">Most people start by evolving a protein, then build, edit, and log results for the next round &mdash; without leaving the page. Pick a goal below; you can switch any time from the sidebar.</p> </div> <button class="modal-close" aria-label="Close" data-starthere-close>&times;</button> </header> <div class="modal-body"> <div class="starthere-goals"> <button type="button" class="starthere-goal" data-goal="design"> <strong>Evolve or improve a protein <span class="pill">Start here</span></strong> <span>Design a ranked variant library with ESM-2 &mdash; then build, edit, and log results for round 2</span> </button> <button type="button" class="starthere-goal" data-goal="plasmid"> <strong>Build a construct from your variants</strong> <span>Clone, map, and annotate &mdash; Gibson, Golden Gate, or restriction digest</span> </button> <button type="button" class="starthere-goal" data-goal="crispr"> <strong>Edit or knock out a gene</strong> <span>Design CRISPR guide RNAs &mdash; knockout or base editing</span> </button> <button type="button" class="starthere-goal" data-goal="primers"> <strong>Check or pick PCR primers</strong> <span>Score your candidates with in-silico PCR + specificity</span> </button> </div> <button type="button" class="starthere-skip" data-starthere-close>I&rsquo;ll explore on my own &rarr;</button> </div> </div> </div> <!-- BLAST consent modal — fires the first time per-session that the user clicks "Identify via NCBI BLAST". Per-session sessionStorage flag means the user only sees this once per browser session. Centered .modal-panel-narrow keeps it visually anchored to the viewport center regardless of where the user has scrolled to. --> <div class="modal" id="blastConsentModal" hidden role="dialog" aria-labelledby="blastConsentTitle" aria-modal="true"> <div class="modal-backdrop" data-blast-cancel></div> <div class="modal-panel modal-panel-narrow" role="document"> <header class="modal-header"> <div> <p class="modal-sub">&sect; Consent</p> <h2 id="blastConsentTitle">Send sequence to NCBI?</h2> </div> <button class="modal-close" aria-label="Close" data-blast-cancel>&times;</button> </header> <div class="modal-body"> <p> Identification runs BLASTp against NCBI's <code>nr</code> database. To do that, the wild-type protein sequence is sent to <code>blast.ncbi.nlm.nih.gov</code> over HTTPS &mdash; encrypted in transit, visible to the U.S. National Library of Medicine, and logged by NCBI for service operation and security. </p> <p> <em>Don't BLAST sequences that are confidential or pre-publication IP.</em> The on-server pipeline (scoring, search, codon optimization) keeps sequences local; only BLAST and the opt-in ESMFold structure prediction leave the machine. </p> <div class="blast-consent-actions"> <button class="ghost" type="button" data-blast-cancel>Cancel</button> <button class="primary" type="button" id="blastConsentContinue"> Continue &middot; remember for this session </button> </div> </div> </div> </div> <!-- ESMFold modal — fires from the per-row "Fold" button. POSTs the variant's amino-acid sequence to Meta's public ESM Atlas API and renders the returned PDB in a Mol* viewer. Standard .modal / .modal-panel structure with the shared close-wiring. --> <div class="modal" id="foldModal" hidden role="dialog" aria-labelledby="foldModalTitle"> <div class="modal-backdrop" data-close-modal></div> <div class="modal-panel" role="document"> <header class="modal-header"> <div> <h2 id="foldModalTitle">Predicted structure · ESMFold</h2> <p class="modal-sub" id="foldModalSub">Folding with Meta ESMFold…</p> </div> <button class="modal-close" aria-label="Close" data-close-modal>×</button> </header> <div class="modal-body" id="foldModalBody"> <!-- Re-uses the .alphafold-viewer / .alphafold-loading classes so the embed reads identically to the BLAST → AlphaFold viewer further down the page. --> <div class="alphafold-viewer" id="foldViewer"> <div class="alphafold-loading"> <span class="identify-spinner"></span> Submitting sequence to ESMFold… </div> </div> <div class="alphafold-disclaimer" id="foldModalDisclaimer"> Predicted by <a href="https://esmatlas.com/about" target="_blank" rel="noopener">ESMFold</a> (Meta AI). <strong>The variant's amino-acid sequence is sent to <code>api.esmatlas.com</code></strong> over HTTPS — encrypted in transit, visible to Meta's servers. Do not fold confidential or pre-publication sequences. Drag to rotate · scroll to zoom · double-click to fit. Backbone confidence colored by pLDDT (blue&nbsp;=&nbsp;high, orange&nbsp;=&nbsp;low). </div> </div> </div> </div> <!-- ===================================================================== First-use disclaimer modal — shown automatically on first visit (localStorage flag) and re-openable via the "Why?" link in the research-strip under the topbar. Single-click acceptance; no fields to fill. The text is the in-UI half of the legal narrative — paired with the ToS the user's lawyer will draft and the per-session synthesis-confirmation modal below. The modal blocks app interaction until the user clicks Accept (the underlying modal-backdrop catches clicks and doesn't dismiss). ===================================================================== --> <div class="modal modal-disclaimer" id="firstUseModal" hidden role="dialog" aria-labelledby="firstUseTitle" aria-modal="true"> <div class="modal-backdrop modal-backdrop-fixed"></div> <div class="modal-panel modal-panel-narrow" role="document"> <div class="disclaimer-body"> <p class="boot-kicker">&sect; Before you begin</p> <h2 id="firstUseTitle" class="disclaimer-title"><em>Research use only.</em></h2> <hr class="boot-rule" /> <p> TuringDNA designs candidate variant libraries with a protein-language-model scoring pipeline. The outputs are <strong>computational predictions</strong>, not laboratory measurements. </p> <p> You are responsible for visually verifying every sequence before sending it to a synthesis vendor. The tool is intended for research and discovery — <em>not</em> for diagnostic, therapeutic, or clinical decision-making. </p> <p> Sequences sent through the optional NCBI BLAST and ESMFold features leave this machine; both are gated behind explicit per-session consent. Don't run them on confidential or pre-publication sequences. </p> <div class="disclaimer-actions"> <button class="primary" type="button" id="firstUseAccept"> I understand — continue </button> </div> <p class="disclaimer-meta"> Acceptance is remembered on this browser. Clear site data to be re-prompted. </p> </div> </div> </div> <!-- ===================================================================== Per-session synthesis verification modal — interposes between the user clicking a Synthesize / Copy designed insert button and the actual network call or clipboard write. Asks the user to actively tick a "I have visually verified this sequence" checkbox. Once ticked once per session (sessionStorage), subsequent synth actions in the same tab skip this modal and use the existing per-action confirms (RE-warn etc.) only when applicable. The acknowledgment is intentionally per-session, not per-action: per-action would create research-tool-hostile friction; per-session still produces a clear "user actively opted in to shipping DNA" record for the legal narrative. ===================================================================== --> <div class="modal modal-disclaimer" id="synthConfirmModal" hidden role="dialog" aria-labelledby="synthConfirmTitle" aria-modal="true"> <div class="modal-backdrop modal-backdrop-fixed"></div> <div class="modal-panel modal-panel-narrow" role="document"> <div class="disclaimer-body"> <p class="boot-kicker">&sect; Verify before synthesis</p> <h2 id="synthConfirmTitle" class="disclaimer-title"><em>Confirm this order.</em></h2> <hr class="boot-rule" /> <div id="synthConfirmDetails" class="disclaimer-detail-block"></div> <p> Before you send a sequence for synthesis, take one last look. Open the variant's detail panel, inspect the DNA block, and check that the mutations, length, and reading frame are what you intend to receive in your tube. </p> <label class="disclaimer-check"> <input type="checkbox" id="synthConfirmCheck" /> <span>I have visually verified this sequence and accept responsibility for the order.</span> </label> <div class="disclaimer-actions"> <button class="ghost-btn" type="button" id="synthConfirmCancel">Cancel</button> <button class="primary" type="button" id="synthConfirmProceed" disabled> Proceed &middot; remember for this session </button> </div> </div> </div> </div> <!-- auth.js MUST load before app.js (and ideally before any /api/* call) — it reads the JWT from the URL fragment, stashes it in sessionStorage, and wraps window.fetch to attach the Authorization header on every same-origin /api/* call. Without this, signed-in users would still hit the anonymous-quota gate. --> <script src="/static/auth.js?v=20260614-loop"></script> <!-- Cloning reference data must load before app.js so the Designer can read VECTORS / ENZYMES / CLONING_METHODS / TAGS / LINKERS. --> <script src="/static/cloning_db.js?v=20260530-ui-polish" defer></script> <script src="/static/app.js?v=20260614-loop" defer></script> </body> </html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>TuringDNA · Engine</title>
<meta name="description" content="TuringDNA — an integrated protein- and DNA-engineering workbench: directed evolution, CRISPR guide design, primer analysis, and a plasmid editor." />
<meta name="theme-color" content="#1b1a17" />
<meta name="color-scheme" content="dark light" />
<meta name="referrer" content="strict-origin-when-cross-origin" />
<!-- The canonical product lives at turingdna.com; the raw engine URL isn't indexed. -->
<meta name="robots" content="noindex,follow" />
<!-- Theme bootstrap — runs BEFORE the stylesheet so <html data-theme> is
set before first paint (no flash on load). Dark is the default; a
saved choice (from the topbar toggle) overrides it. First-party
inline script; touches only our own localStorage + documentElement. -->
<script>
(function () {
try {
var t = localStorage.getItem('td-theme');
if (t !== 'light' && t !== 'dark') { t = 'dark'; } // dark by default
document.documentElement.setAttribute('data-theme', t);
} catch (e) {
document.documentElement.setAttribute('data-theme', 'dark');
}
})();
</script>
<!-- ?v= query bumps invalidate browser + iframe asset caches when app.css /
app.js change. Bump these numbers whenever you ship a frontend update —
without them, users keep getting the stale file for up to a week. -->
<link rel="stylesheet" href="/static/app.css?v=20260614-loop" />
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg?v=2" />
<link rel="apple-touch-icon" href="/static/favicon.svg?v=2" />
<!-- Mol* (PDBe) 3-D viewer is ~4.9 MB. We do NOT eager-load it on every
page view — app.js ensureMolstar() loads it lazily the first time a
Fold / AlphaFold viewer is opened, with a jsDelivr → unpkg fallback and
no fixed timeout (the old eager `defer` + 8 s wait was why both viewers
"failed to load" so often on slower links). Preconnect just warms the
CDNs so that first lazy load is fast. -->
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<link rel="preconnect" href="https://unpkg.com" crossorigin />
</head>
<body>
<!-- Bio-luminous atmospheric backdrop (ambient glow + vignette + grain),
painted under the app; dark-mode only. Fades in on load. -->
<div class="bg-atmos" id="bgAtmos" aria-hidden="true"></div>
<!-- Cursor-following luminous aurora (desktop, dark, motion-on). -->
<div id="cursorGlow" aria-hidden="true"></div>
<script>
(function(){
var a=document.getElementById('bgAtmos'); if(a) requestAnimationFrame(function(){a.classList.add('lit');});
var reduce=false; try{reduce=matchMedia('(prefers-reduced-motion: reduce)').matches;}catch(e){}
if(reduce || !matchMedia('(pointer: fine)').matches) return;
var cg=document.getElementById('cursorGlow'); if(!cg) return;
var tx=innerWidth/2, ty=innerHeight/2, cx=tx, cy=ty, raf=null;
function tick(){ raf=null; cx+=(tx-cx)*0.12; cy+=(ty-cy)*0.12;
cg.style.setProperty('--cx', cx.toFixed(1)+'px'); cg.style.setProperty('--cy', cy.toFixed(1)+'px');
if(!document.hidden && (Math.abs(tx-cx)>0.5 || Math.abs(ty-cy)>0.5)) raf=requestAnimationFrame(tick); }
window.addEventListener('pointermove', function(e){ tx=e.clientX; ty=e.clientY; cg.style.opacity='1';
if(!raf && !document.hidden) raf=requestAnimationFrame(tick); }, {passive:true});
document.addEventListener('mouseleave', function(){ cg.style.opacity='0'; });
})();
</script>
<!-- One-time material-change notice (Privacy/Terms v2.0). Dismiss persists in localStorage. -->
<div id="policyNotice" class="policy-notice" hidden>
<span class="policy-notice-text">We've updated our <a href="https://turingdna.com/privacy/" target="_blank" rel="noopener">Privacy Policy</a> &amp; <a href="https://turingdna.com/terms/" target="_blank" rel="noopener">Terms</a> (v2.0, effective 8&nbsp;Jul&nbsp;2026): we now use <strong>anonymous, aggregated</strong> signals to improve our models. Your individual sequences stay private — never shared, exposed, or reproduced. Prefer not to continue? You can export or delete your data before then (<a href="https://turingdna.com/contact/" target="_blank" rel="noopener">contact us</a>).</span>
<button type="button" id="policyNoticeClose" class="policy-notice-close">Got&nbsp;it</button>
</div>
<div class="app">
<!-- ============================== SIDEBAR ============================== -->
<aside class="sidebar" id="sidebar">
<a class="brand" href="/">
<span class="brand-mark" aria-hidden="true">
<!-- Living logo: perpetually-writhing supercoiled plasmid
(Canvas, animated by initPlasmidLogo() in app.js). -->
<canvas class="brand-mark-canvas" aria-hidden="true"></canvas>
</span>
<span class="brand-word">TuringDNA</span>
</a>
<!--
Editorial sidebar nav. Was a SaaS-clone with bucket-section
labels ("Workspace" / "Reference"), SVG icons next to every
item, and a debug widget at the bottom exposing the raw
HuggingFace model identifier + a "Stop server" button. All
of that read as AI-generated SaaS dashboard scaffolding and
broke the editorial register the rest of the system targets.
Now: type-only, no buckets, no debug. Library / History /
Documentation listed inline.
-->
<nav class="nav">
<!--
"Start here" — opens the goal router ("What are you working
on?") so a newcomer who knows their aim lands in the right
tool. Action item (role=button), not a route.
-->
<a class="nav-item nav-item-start" id="navStartHere" role="button" tabindex="0">Start here</a>
<!--
Directed Evolution — ESM-2 zero-shot variant-library
generator (the flagship engine). NOT de novo design.