uni.cox: uni.cox

Description Usage Arguments Value Examples

View source: R/uni-cox.R

Description

Performs univariate cox proportional hazard model on every feature

Usage

1
uni.cox(X, surv.dat, surv.formula, filter = 0, genes = NULL)

Arguments

X

Matrix/surv.datframe of genomic features, continuous or binary (note cannot handle categorical surv.dat for the moment).

surv.dat

a surv.dat frame containing the survival information. This can be made of 2 or 3 columns. 1 or 2 for time, and one for status (where 1 is event and 0 is no event).

surv.formula

a survival formula with names matching those in surv.dat eg: Surv(time,status)~.

filter

a numeric value between 0 and 1 (1 not included) that is the lower bound for the proportion of patients having a genetic event (only for binary features). All features with an event rate lower than that value will be removed. Default is 0 (all features included).

genes

a character vector of gene names that will be the only ones to be kept. Default is NULL, all genes are used.

Value

tab A table of all the fits performed sorted by adjusted pvalues.

p An interactive plot of log(pvalue) by hazard ration.

KM List of survival plots of the top 10 most significant genes

Examples

1
2
3
4
5
6
7
8
9
library(gnomeR)
patients <- unique(clin$DMPID)[1:100]
mut.only <- create.bin.matrix(patients = patients,maf = mut)
gen.dat <- mut.only$mut
surv.dat <-clin[match(patients,clin$DMPID),match(c("time","status") ,colnames(clin))]
surv.dat$status <- ifelse(surv.dat$status == "DECEASED",1,0)
surv.dat$time <- as.numeric(as.character(surv.dat$time))

cox.fits <- uni.cox(X = gen.dat,surv.dat = surv.dat, surv.formula = Surv(time,status)~.,filter = 0.03)

margarethannum/gnomeR documentation built on Feb. 26, 2020, 8:16 p.m.