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, andevent_observedcolumns - 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
| Parameter | Default | Purpose |
|---|---|---|
clinical_path | — | Patient survival table |
feature_path | — | Molecular features for stratification and Cox models |
longitudinal_path | — | Timepoint feature trajectories |
stratify_by | — | Column for Kaplan-Meier group stratification |
cox_covariates | [] | Columns included in multivariate Cox regression |
Outputs
| Output | Description |
|---|---|
kaplan_meier | Survival curve data per stratification group |
logrank | Log-rank test statistic and p-value |
cox_regression | Hazard ratios, confidence intervals, and p-values per covariate |
longitudinal | Feature 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
- AI interpretation
- Sample data — clinical test fixtures
- Pipelines reference