mSet: provide cutoff threshold and GSEA values for gene set of two...

View source: R/functions.R

mSetR Documentation

provide cutoff threshold and GSEA values for gene set of two or more genes

Description

provide cutoff threshold and GSEA values for gene set of two or more genes

Usage

mSet(gs, ENS, os, ref, cut = "median")

Arguments

gs

the genes we want to use to classify samples based on expression

ENS

expression values (FPKM) tibble with samples as columns and ENSMBL ids as rows

os

tibble with samples, overall survival (OS) values, and Vital.Status values

ref

reference tibble with ensmble ids and gene symbols as columns, converts to ENS using this

cut

method to use to separate into high and low groups, can be either median (defualt) or cutP

Value

the cutoff threshold and GSEA scores as a list

Examples

expr = abs(matrix(rnorm(100),ncol=10))
rownames(expr) = paste0(rep("ENSG",10),1:10)
colnames(expr) = letters[1:10]
ref = dplyr::tibble(ensg = paste0(rep("ENSG",10), 1:10), symbol = paste0(rep("gene",10), 10:1))
os = dplyr::tibble(sample = letters[1:10], OS = 10:19, Vital.Status = c(rep("Alive",8),rep("Dead",2)))
mSet(c("gene1","gene4","gene5"), ENS = expr, os = os, ref = ref, cut = "cutP")

hmumme/survivalHelp documentation built on June 6, 2022, 9:15 p.m.