How do I use muscat if my single cell data comes from different datasets with clear batch effects?
WyzhaoJo opened this issue · 2 comments
WyzhaoJo commented
My single cell data comes from different datasets. There are clear batch effects. How do I remove batch effects in pseudobulk analysis?Thanks a lot!
plger commented
Use the design
argument:
mm <- model.matrix(~batch+group)
res <- pbDS(pb, design=mm)
If you have a complex design you might also want to use the contrast
or coef
argument of pbDS
to specify what specific effect you want to test. If you need more info on that, google or check chapter 9 of limma::limmaUsersGuide()
.
WyzhaoJo commented
Thanks!!I'll try it tomorrow!!