run_rpart: Run rpart on a named gene, return clinical data with appended...

Description Usage Arguments Value Examples

View source: R/run_rpart.R

Description

Run rpart on a named gene, return clinical data with appended high/low based on cutoff

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
run_rpart(
  expr_df,
  gene_ids,
  clin_df,
  surv_event,
  surv_time,
  join_el = NULL,
  print_pdf = NULL,
  title_text = NULL
)

Arguments

expr_df

data.frame containing expression in log2tpm with a unique column represented by param gene_id, rows are samples

gene_ids

vector of strings in colnames(expr_df) relating to log2tpm data for one or more gene

clin_df

data.frame containing clinical data with unique columns represented by surv_event and surv_time, rows are samples

surv_event

colnames(clin_df) relating to survival event

surv_time

colnames(clin_df) relating to survival event

join_el

colname on which to join expression and survival data (default: rownames)

print_pdf

print PDF to file (else return in output list)

title_text

title text for plot

Value

tibble of clin_df with two columns appended, 'gene_id'_group, 'gene_id'_log2tpm; rpart PDF printed

Examples

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

DonaghEgan/rpartSurvivalClassifier documentation built on Dec. 17, 2021, 5:29 p.m.