Download source/src/AssayEvidence.tsx from CladeTeam/ouroboros: direct link, hf CLI and curl.
- Browser
- Download file 4.98 kB
-
https://huggingface.co/spaces/CladeTeam/ouroboros/resolve/main/source/src/AssayEvidence.tsx
- Command line
-
hf download hf://spaces/CladeTeam/ouroboros/source/src/AssayEvidence.tsx
-
curl -L -o AssayEvidence.tsx https://huggingface.co/spaces/CladeTeam/ouroboros/resolve/main/source/src/AssayEvidence.tsx
4.98 kB
| import {useState} from 'react'; | |
| export type AssayRow={id:string;name:string;kind:string;tpa:number;mhet:number;total:number;length:number;fastaUrl:string}; | |
| export type WetlabData={submittedDesigns:number;reportedDesigns:number;activeDesigns:number;inactiveDesigns:number;rows:AssayRow[];conditions:string|null;replicates:string|null}; | |
| export const formatProduct=(n:number)=>n.toLocaleString('en-US',{minimumFractionDigits:2,maximumFractionDigits:2}); | |
| export function AssayEvidence({data,onExplore}:{data:WetlabData;onExplore:(id:string)=>void}){ | |
| const [metric,setMetric]=useState<'total'|'tpa'|'mhet'>('total'); | |
| const featured=data.rows.find(r=>r.id==='de2')!; | |
| const reference=data.rows.find(r=>r.id==='Y1')!; | |
| const rows=[featured,reference,...data.rows.filter(r=>r.id!=='de2'&&r.kind==='design')]; | |
| const max=Math.max(...rows.map(r=>r[metric])); | |
| const label=metric==='total'?'TPA + MHET':metric.toUpperCase(); | |
| const fold=featured.total/reference.total; | |
| return <> | |
| <div className="wetlab-outcome"><div className="outcome-intro"><span className="micro">FROM COMPUTATIONAL SCREENING TO THE BENCH</span><p><strong>{data.activeDesigns} of {data.submittedDesigns}</strong> tested designs showed PETase activity.</p></div><div className="outcome-dots" aria-hidden="true">{Array.from({length:data.submittedDesigns},(_,i)=><i key={i} className={i<data.activeDesigns?'active':''}/>)}</div><div className="outcome-counts"><span><i/>{data.activeDesigns} active</span><span><i/>{data.inactiveDesigns} without detected activity</span></div></div> | |
| <div className="wetlab-evidence"> | |
| <div className="wetlab-story"><span className="eyebrow"><i/> FEATURED DESIGN · DE2</span><h3>A designed PETase.<br/><em>A stronger result.</em></h3><p>DE2 produced more TPA + MHET than the natural IsPETase reference in the reported assay.</p><div className="wetlab-fold"><strong>{fold.toFixed(2)}<em>×</em></strong><span>the total product concentration<br/>of IsPETase</span></div><div className="wetlab-comparison"><div><span>DE2</span><strong>{formatProduct(featured.total)} <small>μM</small></strong></div><div><span>IsPETase</span><strong>{formatProduct(reference.total)} <small>μM</small></strong></div></div><p className="wetlab-selection">{((fold-1)*100).toFixed(1)}% higher combined product concentration. The other eight active designs produced less total product than IsPETase.</p><button className="text-button wetlab-explore" onClick={()=>onExplore('de2')}>Explore DE2’s sequence & structure <span>↓</span></button></div> | |
| <div className="wetlab-chart"><div className="wetlab-chart-heading"><div><span className="micro">NINE ACTIVE DESIGNS + NATURAL REFERENCE</span><p>Every result, on the same scale.</p></div><span className="wetlab-unit">μM</span></div><div className="segmented" role="group" aria-label="Assay product">{(['total','tpa','mhet'] as const).map(m=><button key={m} onClick={()=>setMetric(m)} aria-pressed={metric===m}>{m==='total'?'TPA + MHET':m.toUpperCase()}</button>)}</div><div className="assay-rows" aria-label={label+' concentrations'}>{rows.map((r,i)=><button key={r.id} className={'assay-row '+(r.id==='de2'?'featured ':'')+(r.kind==='wildtype'?'reference ':'')+(i===2?'other-designs-start':'')} onClick={()=>onExplore(r.id)} aria-label={`Explore ${r.name}: ${formatProduct(r[metric])} micromolar ${label}`}><span className="assay-row-name"><strong>{r.name}</strong><span>{r.id==='de2'?'TOP DESIGN':r.kind==='design'?'DESIGN':'WT REFERENCE'}</span></span><span className="assay-bar" aria-hidden="true">{metric==='total'?<><i className="tpa" style={{width:`${r.tpa/max*100}%`}}/><i className="mhet" style={{width:`${r.mhet/max*100}%`}}/></>:<i className={metric} style={{width:`${r[metric]/max*100}%`}}/>}</span><span className="assay-value">{formatProduct(r[metric])}</span><span className="assay-row-arrow" aria-hidden="true">↗</span></button>)}</div><div className="assay-legend"><span><i className="tpa"/>TPA</span><span><i className="mhet"/>MHET</span><small>Linear scale · select a row to explore</small></div><p className="assay-context">Reported product concentrations. The 1.41× comparison refers to TPA + MHET under this assay, not a kinetic rate.</p><details className="assay-notes"><summary>Screening outcome & assay details</summary><p>Model-generated candidates were computationally screened before 12 selected designs were submitted for wet-lab testing. Nine showed PETase activity; three did not. The nine active designs are presented here. This 9/12 outcome describes the screened, tested set.</p><p>{data.conditions||'Assay conditions have not been supplied with this update.'} {data.replicates||'Replicate counts and variability are not available; no statistical significance is claimed.'} Structures are computational predictions.</p><div className="source-links"><a href="/data/petase-assay.csv" download>↓ Assay data (CSV)</a><a href="/data/wetlab.json" download>↓ Source record</a></div></details></div> | |
| </div> | |
| </>; | |
| } | |