Description Usage Arguments Value Examples
View source: R/run_surv_plot.R
Run survival analysis and plot using rpart output from run_rpart()
1 2 3 4 5 6 7 8 9 10 11 | run_surv_plot(
clin_tb,
gene_ids,
surv_event,
surv_time,
expr_unit = "log2tpm",
col_palette = NULL,
print_pdf = NULL,
title_text = "",
sub_text = ""
)
|
clin_tb |
tibble created by run_rpart(), or a tibble containing a columns named 'gene_ids1_group' and surv_event, surv_time as below |
gene_ids |
vector of strings used in run_rpart to define gene used in classification |
surv_event |
colnames(clin_tb) relating to survival event |
surv_time |
colnames(clin_tb) relating to survival event |
expr_unit |
unit of expression in clin_tb; default - log2tpm |
col_palette |
colours to use in plotting (vector, high -> low expression; think palette in ggsurvplot is alphanum sorted...) |
print_pdf |
print PDF to file (else return in output list) |
title_text |
title text for plot |
sub_text |
sub text for plot |
table from survival::survdiff (log rank test), ggsurvplot PDF printed
1 2 3 4 | expr_df <- readRDS(system.file("extdata", "expr_df.rds", package="rpartSurvivalClassifier"))
clin_df <- readRDS(system.file("extdata", "clin_df.rds", package="rpartSurvivalClassifier"))
clin_new_tb <- rpartSurvivalClassifier::run_rpart(expr_df = expr_df, gene_id = "CRABP2", clin_df = clin_df, surv_event = "OS", surv_time = "OS.time", join_el = "sample")
log_rank_res <- rpartSurvivalClassifier::run_surv_plot(clin_tb = clin_new_tb, gene_id = "CRABP2", surv_event = "OS", surv_time = "OS.time")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.