-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Dear MUSCAT team,
@HelenaLC @plger
I hope my message finds you all fine. I have a small question for you:
I would like to test the difference in gene expression between 3 groups: A, B and C (where group C is the control group, and thus the reference level of the group factor). I am interested in the following comparisons: A vs. C, B vs. C & A vs. C. I would like to like to test this using mmDS.
I ran the function as follows:
mm <- mmDS(sce, method = "dream2",
n_cells = 10, n_samples = 2,
min_count = 1, min_cells = 20,
coef = c("group_idA","group_idB"), covs = "scaled.cdr")
where scaled.cdr is a scaled vector of the cellular detection rate (number of genes expressed in each cell)
The result looked like this:
List of 1
$ CellType1:'data.frame': 6586 obs. of 9 variables:
..$ gene : chr [1:6586] "AL627309.1" "AP006222.2" "RP4-669L17.10" "RP11-206L10.3" ...
..$ cluster_id : chr [1:6586] "CellType1" "CellType1" "CellType1" "CellType1" ...
..$ group_idA : num [1:6586] -0.0471 -0.0226 -0.0489 -0.0492 -0.0564 ...
..$ group_idB: num [1:6586] -0.0327 -0.0215 -0.0365 -0.0838 -0.0355 ...
..$ AveExpr : num [1:6586] 18.1 18 18 18.2 18 ...
..$ F : num [1:6586] 1.31 0.31 1.34 1.95 1.93 ...
..$ p_val : num [1:6586] 0.28 0.735 0.273 0.154 0.157 ...
..$ p_adj.loc : num [1:6586] 0.856 0.891 0.856 0.821 0.825 ...
..$ p_adj.glb : num [1:6586] 0.856 0.891 0.856 0.821 0.825 ...
So I have the coefficients representing the comparisons A vs. C (group_idA) & B vs. C (group_idB) and a single P-value which I assume represents the likelihood ratio test result after dropping the whole "group" variable from the model (Please correct me if I am wrong ?)
My questions is how I can test the significance of each comparison (A vs. C, B vs. C & A vs. B) individually and get a separate P-value for each comparison using mixed-effects models?
I know that in pseudobulk analysis with pbDS, it is possible to achieve this by defining a design matrix and a contrast matrix as described in the vignette. But how can I achieve this in mixed models?
Thank you very much.
Sincerely,
Ismail