Description Usage Arguments Value Author(s) See Also Examples
View source: R/MAF.survgroup.R
The groups of patients are identified according to whether the varints exist on a single gene. Survival difference between patients with and without mutations is compared.
1 2 3 4 | MAF.survgroup(surv.data, time, status, maf, variants = NULL,
sample.name = "Tumor_Sample_Barcode", gene.name = "Hugo_Symbol",
variant.type = "Variant_Classification", num.genes = 10,
siginificant.genes = 1, ...)
|
surv.data |
survival data |
time |
survival time |
status |
status indicator |
maf |
a MAF file |
variants |
types of varints on a single gene for mutated samples. samples with any mutations, defined as mutated samples by default. |
sample.name |
the column name containing sample names (defult: "Tumor_Sample_Barcode") |
gene.name |
the column name containing gene names (defult: "Hugo_Symbol") |
variant.type |
the column name containing variant types (defult: "Variant_Classification") |
num.genes |
the number of top genes based on the number of mutated genes (default: 10) |
siginificant.genes |
the number of top genes based on the statistical siginificance of mutated genes (default: 1) |
... |
additional parameters for the "ggsurvplot" for the statistically siginificant genes |
time |
survival time |
status |
status indicator |
surv.data |
survival data |
maf.matrix |
a mutation matrix |
summary |
a list of number of samples with variants, chi-squared statistics and p-values |
cluster |
a vector of integers indicating the cluster to which each sample is assigned, for the most significant gene |
fit |
fitted survival curves, for the most significant gene |
Dongmin Jung
survival::Surv, survival::survfit, survival::survdiff, survminer::ggsurvplot
1 2 3 4 5 6 7 8 9 10 11 12 | library(maftools)
laml.maf <- system.file('extdata', 'tcga_laml.maf.gz', package = 'maftools', mustWork = TRUE)
laml.clin <- system.file('extdata', 'tcga_laml_annot.tsv', package = 'maftools', mustWork = TRUE)
laml.maf <- read.csv(laml.maf, sep = "\t")
laml.clinical.data <- read.csv(laml.clin, sep = "\t", row.names = 1)
index <- which(laml.clinical.data$days_to_last_followup == -Inf)
laml.clinical.data <- laml.clinical.data[-index,]
laml.clinical.data <- data.frame(laml.clinical.data)
laml.survgroup <- MAF.survgroup(laml.clinical.data, time = "days_to_last_followup",
status = "Overall_Survival_Status", laml.maf,
num.genes = 3, siginificant.genes = 1,
pval = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.