mafSurvival {maftools} | R Documentation

## Performs survival analysis

### Description

Performs survival analysis by grouping samples from maf based on mutation status of given gene(s) or manual grouping of samples.

### Usage

    mafSurvival(
      maf,
      genes = NULL,
      samples = NULL,
      clinicalData = NULL,
      time = "Time",
      Status = "Status",
      groupNames = c("Mutant", "WT"),
      showConfInt = TRUE,
      addInfo = TRUE,
      col = c("maroon", "royalblue"),
      isTCGA = FALSE,
      textSize = 12
    )

### Arguments

`maf` | an `MAF` object generated by `read.maf`
`genes` | gene names for which survival analysis needs to be performed. Samples with mutations in any one of the genes provided are used as mutants.
`samples` | samples to group by. Genes and samples are mutually exclusive.
`clinicalData` | dataframe containing events and time to events. Default looks for clinical data in annotation slot of `MAF`.
`time` | column name contining time in `clinicalData`
`Status` | column name containing status of patients in `clinicalData`. must be logical or numeric. e.g, TRUE or FALSE, 1 or 0.
`groupNames` | names for groups. Should be of length two. Default c("Mutant", "WT")
`showConfInt` | TRUE. Whether to show confidence interval in KM plot.
`addInfo` | TRUE. Whether to show survival info in the plot.
`col` | colors for plotting.
`isTCGA` | FALSE. Is data is from TCGA.
`textSize` | Text size for surv table. Default 7.

### Details

This function takes MAF file and groups them based on mutation status associated with given gene(s) and performs survival analysis. Requires dataframe containing survival status and time to event. Make sure sample names match to Tumor Sample Barcodes from MAF file.

### Value

Survival plot

### Examples

    laml.maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
    laml.clin <- system.file("extdata", "tcga_laml_annot.tsv", package = "maftools")
    laml <- read.maf(maf = laml.maf,  clinicalData = laml.clin)
    mafSurvival(maf = laml, genes = 'DNMT3A', time = 'days_to_last_followup', Status = 'Overall_Survival_Status', isTCGA = TRUE)

[Package maftools version 2.10.05 Index]