Hello,
I just wanted to clarify something about the excellent package RegEnrich.
In my dataset, the expression data comprises samples from several "tissue-times".
I.e. Lesional.wk00, Lesional.wk01, Lesional.wk12, Nonlesional.wk00, Nonlesional.wk12
I would like to compare these tissue-times with various contrasts using limma and derive key regulators using RegEnrich.
To my understanding, the best way to do this would be to set up the design matrix and then run RegEnrich for each contrast of interest - see example below to illustrate.
My question is about which samples are used for the network inference part of the RegEnrich workflow.
You will see that below I'm feeding in expression data and sample data for all of the samples (i.e. all of the tissue-times) but I am specifying a contrast that only corresponds to two tissue-times.
Will RegEnrich use all of the samples for network inference or just the samples that are used for the differential expression contrast?
Thank you.
# Design matrix
des <- model.matrix(~ 0 + Tissue.Time + Patient_id, data = clin)
colnames(des) <- gsub("Patient_id", "", colnames(des))
colnames(des) <- gsub("Tissue.Time", "", colnames(des))
# Voom counts
v <- voom(y, des)
# Contrasts matrix
contrast.matrix <- makeContrasts(
wk00_LS_vs_NL = Lesional.wk00-Nonlesional.wk00,
wk12_LS_vs_NL = Lesional.wk12-Nonlesional.wk12,
LS_wk01_vs_wk00 = Lesional.wk01-Lesional.wk00,
LS_wk12_vs_wk00 = Lesional.wk12-Lesional.wk00,
NL_wk12_vs_wk00 = Nonlesional.wk12-Nonlesional.wk00,
levels = des
)
# Initialise RegEnrich object
object <- RegenrichSet(
expr = v$E,
colData = clin,
method = "limma",
design = des,
contrast = contrast.matrix,
coef = "wk00_LS_vs_NL",
weights = v$weights,
reg = regulators,
networkConstruction = "GRN",
enrichTest = "GSEA"
)
Thanks very much