mafSurvival: Performs survival analysis

Description Usage Arguments Details Value Examples

View source: R/mafSuvival.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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,
  fn = NULL,
  width = 6,
  height = 6
)

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.

fn

NULL. If provided saves pdf plot with basename fn.

width

width of plot to be saved. Default 6

height

height of plot to be saved. Default 6

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

1
2
3
4
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)

thesushantpatil/maftools documentation built on May 18, 2020, 9:54 p.m.