Gradient Biotech
U

Menu

Survival analysis

Survival analysis connects molecular features to clinical outcomes — Kaplan-Meier curves, log-rank testing, multivariate Cox regression, and longitudinal molecular trajectories.

Uses the lifelines library for Kaplan-Meier estimation, log-rank tests, and Cox proportional hazards regression.

Prerequisites

  • Clinical CSV with patient_id, time_to_event_days, and event_observed columns
  • Optional feature CSV with molecular variables for stratification and Cox covariates
  • Optional longitudinal CSV for treatment timepoint trajectories

Launching the pipeline

Open the study Survival page or dispatch via API:

curl -X POST http://localhost:8001/oncology/jobs/survival \
  -H "Content-Type: application/json" \
  -d '{
    "study_id": "your-study-id",
    "parameters": {
      "clinical_path": "/path/to/clinical.csv",
      "feature_path": "/path/to/features.csv",
      "longitudinal_path": "/path/to/longitudinal.csv",
      "stratify_by": "treatment_arm",
      "cox_covariates": ["tmb", "cd8_score"]
    }
  }'

Key parameters

ParameterDefaultPurpose
clinical_pathPatient survival table
feature_pathMolecular features for stratification and Cox models
longitudinal_pathTimepoint feature trajectories
stratify_byColumn for Kaplan-Meier group stratification
cox_covariates[]Columns included in multivariate Cox regression

Outputs

OutputDescription
kaplan_meierSurvival curve data per stratification group
logrankLog-rank test statistic and p-value
cox_regressionHazard ratios, confidence intervals, and p-values per covariate
longitudinalFeature trajectory summaries across timepoints

The frontend Survival page renders Kaplan-Meier curves with log-rank p-values and Cox regression tables.

Typical use cases

  • Compare overall survival between treatment arms
  • Stratify survival by TMB, immune phenotype, or gene signature score
  • Test whether molecular features independently predict outcome in multivariate Cox models
  • Track CD8 score or other biomarkers across baseline and on-treatment timepoints

Next steps