getSurvival {RTCGAToolbox} | R Documentation

## Perform survival analysis based on gene expression data

### Description

`getSurvival` draws a KM plot and show survival analysis results between groups that are defined by gene expression data

### Usage

    getSurvival(dataObject, numberofGroups = 2, geneSymbols,
      sampleTimeCensor)

### Arguments

`dataObject` | This must be `FirehoseData` object.
`numberofGroups` | Can be set as 2 or 3. (Default 2) Order and divide samples into n groups by using gene expression data.
`geneSymbols` | Gene symbol that is going to be tested
`sampleTimeCensor` | a data frame that stores clinical data. First column should store sample IDs, second column should have time and third column should have event information. For more information please see vignette.

### Value

Draws a KM plot

### Examples

    ## get data with  getFirehoseData function and call survival analysis
    ## Always check clinical data file for structural changes

    data(RTCGASample)
    clinicData <- getData(RTCGASample,"clinical")
    clinicData = clinicData[,3:5]
    clinicData[is.na(clinicData[,3]),3] = clinicData[is.na(clinicData[,3]),2]
    survData <- data.frame(Samples=rownames(clinicData),Time=as.numeric(clinicData[,3]),
    Censor=as.numeric(clinicData[,1]))
    getSurvival(dataObject=RTCGASample,geneSymbols=c("FCGBP"),sampleTimeCensor=survData)

[Package RTCGAToolbox version 2.16.3 Index]