lmerSeq.fit | R Documentation |
Wrapper function that its linear mixed models to (transformed) RNA-Seq data using the utilities present in the lme4 package.
lmerSeq.fit( form = NULL, expr_mat = NULL, gene_names = NULL, sample_data = NULL, weights = NULL, REML = T, parallel = F, cores = 2 )
form |
A one-sided linear formula describing both the fixed-effects and random-effects parts of the model using the syntax of the lme4 package |
expr_mat |
A (G x N) numeric matrix or data frame of transformed RNA-seq counts (e.g. using VST from DESeq2), with genes in rows and samples in columns. G = number of genes. N = number of samples. |
gene_names |
An optional character vector of gene names (length G). If unspecified, row names from the expression matrix will be used. |
sample_data |
Data frame with N rows containing the fixed- and random-effects terms included in the formula. The rows of the data frame must correspond (and be in the same order as) the columns of the expression matrix. |
weights |
An optional (G x N) numeric matrix of weights to be used in the model fitting |
REML |
Should the models be fit with REML or regular ML? |
parallel |
If on Mac or linux, use forking (via mclapply) to parallelize fits |
cores |
Number of cores to use (default is 2) |
data("expr_data") vst_expr <- expr_example$vst_expr sample_meta_data <- expr_example$sample_meta_data ## Only including 10 genes in the expression matrix vst_expr <- vst_expr[1:10, ] ## Fit the Model fit.lmerSeq <- lmerSeq.fit(form = ~ group * time + (1|ids), expr_mat = vst_expr, sample_data = sample_meta_data, REML = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.