find_markers2: A function for finding markers for hidden factors

Description Usage Arguments Value Examples

Description

Function takes a read counts matrix of entire gene set and a matrix of surrogate variables estimated by IA-SVA as input, identifies marker genes highly correlated with each surrogate variable and returns a read counts matrix of the markers.

Usage

1
2
find_markers2(Y, iasva.sv, method = "BH", sig.cutoff = 0.05,
  rsq.cutoff = 0.3, verbose = FALSE)

Arguments

Y

A SummarizedExperiment class containing read counts where rows represent genes and columns represent samples.

iasva.sv

matrix of estimated surrogate variables, one column for each surrogate variable.

method

multiple testing adjustment method, default = "BH".

sig.cutoff

significance cutoff.

rsq.cutoff

R squared cutoff.

verbose

If verbose = TRUE, the function outputs detailed messages.

Value

all.markers A list object where each element of the list contains marker genes for each SV. The last element of the list contains the unique marker genes across all SVs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
counts_file <- system.file("extdata", "iasva_counts_test.Rds",
 package = "iasva")
counts <- readRDS(counts_file)
anns_file <- system.file("extdata", "iasva_anns_test.Rds",
 package = "iasva")
 anns <- readRDS(anns_file)
Geo_Lib_Size <- colSums(log(counts + 1))
Patient_ID <- anns$Patient_ID
mod <- model.matrix(~Patient_ID + Geo_Lib_Size)
summ_exp <- SummarizedExperiment::SummarizedExperiment(assays = counts)
iasva.res <- iasva(summ_exp, mod[, -1], num.sv = 5, permute = FALSE)
markers <- find_markers(summ_exp, iasva.res$sv)

dleelab/leedonghyung documentation built on May 7, 2019, 8:43 a.m.