GGenomics UI
Components/Clinical & stats

Survival Curve

@genomics/survival-curve

Kaplan–Meier with numbers at risk and a log-rank test.

Preview

144 subjects · 2 strata · log-rank p < 1e-4 (χ²=20.13, df=1)
Use left and right arrow keys to step between points, Home and End for the first and last, Enter to select, Escape to clear.

About

The plot every stratification argument ends in, and the one question no other viewer here can answer, because the difficulty is censoring: a patient last seen alive at 14 months is neither a death nor a missing row. Drawn as a step function (survival only changes at observed events), with the three details reviewers ask for by name — censoring ticks, the numbers-at-risk table that exposes a dramatic late separation resting on four patients, and the log-rank p-value. Strata ride the entity channel, so picking a curve highlights the same group elsewhere.

Usage

import { SurvivalCurveChart } from "@/components/ui/survival-curve"

<SurvivalCurveChart
  subjects={[{ time: 14.2, event: true, group: "TP53 mutant" }]}
  timeLabel="months"
/>
Source: components/ui/survival-curve.tsx