run_lm_stats_limma: Estimate linear-model stats for a matrix of data using limma...

View source: R/linear_association.R

run_lm_stats_limmaR Documentation

Estimate linear-model stats for a matrix of data using limma with empirical Bayes moderated t-stats for p-values

Description

Estimate linear-model stats for a matrix of data using limma with empirical Bayes moderated t-stats for p-values

Usage

run_lm_stats_limma(
  mat,
  vec,
  covars = NULL,
  weights = NULL,
  target_type = "Gene",
  limma_trend = FALSE
)

Arguments

mat:

Nxp data matrix with N cell lines and p genes

vec:

N vector of independent variables. Can be two-group labels as factors, bools, or can be numeric

covars:

Optional Nxk matrix of covariates

weights:

Optional N vector of precision weights for each data point

target_type:

Name of the column variable in the data (default 'Gene')

limma_trend:

Whether to fit an intensity trend with the empirical Bayes variance model

Value

: data frame of stats

Examples

CRISPR = load.from.taiga(data.name='avana-2-0-1-d98f',
data.version=1,
data.file='ceres_gene_effects',
transpose = T)
is_panc <- load.from.taiga(data.name = 'ccle-lines-lineages') %>% .[, 'pancreas']
ulines <- intersect(rownames(CRISPR), names(is_panc))
lim_res <- run_lm_stats_limma(CRISPR[ulines,], is_panc[ulines])

broadinstitute/cdsr_models documentation built on Aug. 9, 2022, 10:36 a.m.