runSurvival: runSurvival

View source: R/utils.R

runSurvivalR Documentation

runSurvival

Description

According to the marker genes or signatures expression high/low levels, patient are divided into two groups and then survival analysis is performed. The survival curves can be plotted.

Usage

runSurvival(
  features,
  data,
  surv.time,
  surv.event,
  cut.off = 0.5,
  savePath = NULL
)

Arguments

features

The names of marker genes or signatures to be analyzed.

data

The data used to perform survival analysis. It should be an expression or signature matrix with gene or signature by patient. The row names are the features' anmes. The columns are patients' labels.

surv.time

The survival time of patients. It should be in accord with the columns of data.

surv.event

The status indicator of patients. 0=alive, 1=dead. It should be in accord with the columns of data.

cut.off

The percentage threshold to divide patients into two groups. The default is 0.5, which means the patients are divided by median. Other values, such as 0.4, means the first 40 percent patients are set "Low" group and the last 40 percent are set "High" group (the median 20 percent are discarded).

savePath

The path to save the survival plots of genes or signatures (the default is NULL and the plots will be return without saving).

Value

A list of survival curves plots.


wguo-research/scCancer documentation built on May 26, 2024, 9:12 p.m.