gen.tab: gen.tab

Description Usage Arguments Value Examples

View source: R/gen-tab.R

Description

Creates a summary table of the distribution of the genetic features by a specific outcome/covariate of interest. The difference is tested using Fisher's exact test and further adjusted for multiple comparisons. Note that continuous genetic factors are dichotomized at their median.

Usage

1
2
gen.tab(gen.dat, outcome, filter = 0, paired = F, cont = F,
  rank = T)

Arguments

gen.dat

A matrix or dataframe, with patients as rows and features as columns.

outcome

A leveled vector of length equal to the number of rows in gen.dat.

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).

paired

Boolean if the data are paired. Default is FALSE.

cont

Should the outcome be treated as a continuous value. Default is FALSE treated as categorical.

rank

Should the table returned be oredered by Pvalue. Boolean, default is T

Value

fits : a table of odds ratio and pvalues.

forest.plot : A forest plot of the top 10 hits.

Examples

1
2
3
4
5
6
7
8
library(gnomeR)
patients <- unique(clin$DMPID)[1:500]
mut.only <- create.bin.matrix(patients = patients,maf = mut)
gen.dat <- mut.only$mut
outcome = as.factor(as.character(clin$Sex[match(patients,clin$DMPID)]))
test <- gen.tab(gen.dat,outcome)
head(test$fits)
test$forest.plot

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