MaGIC Survival Analysis Tool

Welcome to the Survival Analysis Tool by the Molecular and Genomics Informatics Core (MaGIC).


How to Use This Tool

  1. Navigate to the Data Input tab. Upload your clinical data file and (optionally) an expression matrix, or click 'Load Demo Data' to explore with a synthetic example.
  2. Map your columns. Select the time-to-event and event/status columns from your data. Choose the appropriate time unit for axis labeling.
  3. Submit your data. Click Submit. The Kaplan-Meier Analysis tab will appear once data is loaded.
  4. Stratify and visualize. Choose how to split patients into groups: by a clinical variable, gene expression level, or a continuous clinical variable with a cutoff method.
  5. Customize and download. Fine-tune colors, fonts, axes, and legend. Download publication-quality plots and summary statistics.

Survival Analysis Concepts

Time-to-Event & Events

Survival analysis studies the time until a specific event occurs (e.g., death, disease recurrence, progression). The time-to-event is the duration from a defined starting point (diagnosis, treatment start) to the event of interest.

An event (status = 1) means the outcome was observed. If the patient was lost to follow-up or the study ended before the event, they are censored (status = 0). Censored observations still contribute information about survival up to the point of censoring.

Kaplan-Meier Estimator

The Kaplan-Meier (KM) estimator is a non-parametric method that estimates the survival function S(t) as a step function. At each time an event occurs, the survival probability is recalculated. The resulting KM curve shows the probability of surviving beyond each time point.

Censored patients are marked with tick marks on the curve, indicating they were still event-free when last observed.

Log-Rank Test

The log-rank test compares survival distributions between two or more groups. It tests the null hypothesis that there is no difference in survival between groups. A small p-value (e.g., < 0.05) suggests a statistically significant difference.

The test compares observed vs. expected events at each time point across groups, giving equal weight to all time points.

Hazard Ratio

The hazard ratio (HR) from a Cox proportional hazards model quantifies the relative risk between two groups.

  • HR = 1: no difference in hazard between groups
  • HR > 1: increased hazard (worse survival) in the test group
  • HR < 1: decreased hazard (better survival) in the test group

A 95% confidence interval that does not cross 1 indicates statistical significance. HR is only meaningful for two-group comparisons.


Required Input Data

Clinical Data (required)
  • File format: CSV or TSV
  • Rows: Patients / samples (one per row)
  • Must include a time-to-event column (numeric: days, months, or years)
  • Must include an event/status column (0/1 or FALSE/TRUE, where 1 = event occurred)
  • Optional: grouping columns (treatment arm, stage, etc.) for stratification
patient_id, time, status, group,    stage
PT001,      450,  1,      Treatment, Stage_II
PT002,      820,  0,      Control,   Stage_I
Expression Matrix (optional)
  • File format: CSV or TSV
  • Rows: Genes (one gene per row)
  • Columns: Samples (must match patient IDs in clinical data)
  • First column: Gene identifiers
  • Required only for gene expression-based stratification
Gene,   PT001, PT002, PT003
TP53,   8.2,   7.9,   9.1
BRCA1,  6.5,   7.1,   5.8

Input Data


Clinical Data (required)

Expression Matrix (optional)


Use dynamically generated demo data to explore survival analysis features.

Demo: ~200 patients with time-to-event, censoring, clinical grouping variables, and a matching 50-gene expression matrix.



Loading...

Loading...
Stratification

No expression matrix loaded. Upload an expression matrix on the Data Input tab to enable gene-based stratification.










Loading...

Download KM Plot