mafSurvival | R Documentation |
Performs survival analysis by grouping samples from maf based on mutation status of given gene(s) or manual grouping of samples.
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
)
maf |
an |
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 |
time |
column name contining time in |
Status |
column name containing status of patients in |
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. |
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.
Survival plot
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.