How to do pairwise multiple comparisons in MAST
0
0
Entering edit mode
@2d984f8e
Last seen 3.7 years ago

I would like to study the effect of a multilevel factor on gene expression in my single-cell RNAseq dataset. (An example dataset can be downloaded from https://github.com/vitamin3615/SigRNA.git) In this example, the variable “condition” is a 3-level factor: E2, E3, and E4. Shown below is the model I constructed with the MAST package. After the likelihood ratio test of the effect of “condition”, I want to do a post-hoc pairwise comparison between the 3 levels of “condition”, say with the multcomp package in R. How can we do that with the MAST output?

Any input is greatly appreciated!

Code should be placed in three backticks as shown below


library('MAST')

# load the data
# download the sample data from https://github.com/vitamin3615/SigRNA.git
sca <- readRDS('sca.rds')
dim(sca)

# check the metadata
head(colData(sca))
str(colData(sca))

# to model the data 
zlmCond <- zlm(~ bg + condition + sex + zAge + cngeneson + percent.MT + Seq_sat + Bulk_RIN + (1|ID),
               method = 'glmer',
               ebayes = FALSE,
               fitArgsD = list(nAGQ = 0),
               sca)


# test the effect of "condition" on gene expression 
LmTest <- lrTest(zlmCond, 'condition ')


sessionInfo( )
MAST • 1.4k views
ADD COMMENT
0
Entering edit mode

HI, did you ever get a good answer for this question? I have the same question.

ADD REPLY

Login before adding your answer.

Traffic: 543 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6