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 <>
{data.activeDesigns} of {data.submittedDesigns} tested designs showed PETase activity.
DE2 produced more TPA + MHET than the natural IsPETase reference in the reported assay.
{((fold-1)*100).toFixed(1)}% higher combined product concentration. The other eight active designs produced less total product than IsPETase.
Every result, on the same scale.
Reported product concentrations. The 1.41× comparison refers to TPA + MHET under this assay, not a kinetic rate.
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.
{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.