import {useRef,useState} from 'react'; export type AnnotationCase={id:string;text:string;source:string;url:string;origin:string;name?:string}; export type AnnotationRow={key:string;count:number;coverage:number;share:number;example?:AnnotationCase}; export type DatasetData={scope:string;scopeConfirmed:boolean;keys:number;recordKeyPairs:number;beyondTopFiveShare:number;rows:AnnotationRow[]}; const number=(n:number)=>n.toLocaleString('en-US'); const pct=(n:number)=>n.toFixed(n<.01?6:2)+'%'; export function Dataset({data}:{data:DatasetData}){ const [selected,setSelected]=useState('function'),[query,setQuery]=useState(''); const rail=useRef(null); const active=data.rows.find(r=>r.key===selected)!; const rows=data.rows.filter(r=>r.key.toLowerCase().includes(query.toLowerCase())); const scroll=(sign:number)=>rail.current?.scrollBy({left:sign*rail.current.clientWidth*.7,behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth'}); return

02 THE LANGUAGE OF THE DATA

Many ways to describe a protein.

Scroll through the keys.
{' '}Select one to explore an annotation.

{data.keys} annotation types{(data.recordKeyPairs/1e6).toFixed(2)}M record–key pairs{data.beyondTopFiveShare.toFixed(1)}% beyond the top five keys
{query?rows.length+' MATCHING KEYS':'29 KEYS · SCROLL TO EXPLORE'}
{rows.map(r=>)}
{!rows.length&&

No matching key.

}
ANNOTATION KEY

{active.key}

{pct(active.coverage)}record coverage{number(active.count)} records
ANNOTATION EXAMPLE{active.example&&{active.example.id} ↗}
{active.example?<>
{active.example.text}
{active.example.name&&{active.example.name} · }{active.example.source}
:

The source annotation is being prepared.

}
Definitions & source data

{data.scope}. Counts total {number(data.recordKeyPairs)} record–key pairs across {data.keys} keys. Records may carry multiple keys; coverage overlaps. This describes annotation breadth, not sequence or species diversity. Case sources are identified individually.

↓ Original key statistics↓ Statistics & examples
; }