Shians / Glimma

Glimma R package
GNU Lesser General Public License v3.0
50 stars 10 forks source link

Specifying a second grouping as batch effect #178

Open peterleary opened 3 years ago

peterleary commented 3 years ago

Hi all,

Really enjoying the new glimmaMA/glimmaMDS/glimmaVolcano functions, they're super useful.

Have you considered adding the option to allow the user to specify a second grouping to be applied as a batch effect? Something that would resemble design = ~ group1 + group2 in DESeq2?

Right now, Glimma simply does res.df <- as.data.frame(DESeq2::results(x)) whereas in a multifactorial experiment, we would specify the contrast like res.df <- as.data.frame(DESeq2::results(x, contrast = c("grouping", sampleGroup, refGroup))) in order to extract the differential expression results with batch effect applied.

Thanks very much in advance! Peter