Question: multtest: how to adjust multiple contrasts in a single run?
0
9.7 years ago by
Guido Hooiveld2.4k
Wageningen University, Wageningen, the Netherlands
Guido Hooiveld2.4k wrote:
I am using limma to analyze my array data. In my dataset three contrasts are relevant, and limma is able to fit these in a single run. I now would like to use the package multtest to calculate adjusted p-values (note: i know limma also is able to calculate these but because of follow-up analyses i now prefer to do this through multtest). Using the function 'mt.rawp2adjp' I can obtain the adjusted p-values, but i have to run this function for each contrast seperately: res1 <- mt.rawp2adjp(fit2$p.value[,1], "BH") res2 <- mt.rawp2adjp(fit2$p.value[,2], "BH") res3 <- mt.rawp2adjp(fit2$p.value[,3], "BH") Since i would like to automate my script, i tried to run multtest with these arguments: res.ALL <- mt.rawp2adjp(fit2$p.value[,colnames(cont.matrix)], "BH") This function runs fine, but i end up with a single list with a length of 68070 entries (68070 = 3x 22690; the MOE430A affy array i use consists of 22690 probesets and i inputted in multtest 3 contrasts). Obviously, this is not the output i can use. Therefore i would appreciate to know whether multtest is able to handle multiple contrast in a single run, and if so, how to perform such analyses. TIA, Guido targets <- readTargets("targets_A23.txt") data <- ReadAffy(filenames=targets$FileName) eset <- rma(data) TS <- paste(targets$Strain, targets$Treatment, sep=".") TS <- factor(TS, levels=c("WT.Con","WT.WY","KO.Con","KO.WY")) design <- model.matrix(~0+TS) colnames(design) <- levels(TS) fit <- lmFit(eset, design) cont.matrix <- makeContrasts(WTwyvWTc=WT.WY-WT.Con, KOwyvKOc=KO.WY-KO.Con, Diff=(WT.WY-WT.Con)-(KO.WY-KO.Con), levels=design) fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2) res1 <- mt.rawp2adjp(fit2$p.value[,1], "BH") adjp <- res1$adjp[order(res$index), ] etc ------------------------------------------------ Guido Hooiveld, PhD Nutrition, Metabolism & Genomics Group Division of Human Nutrition Wageningen University Biotechnion, Bomenweg 2 NL-6703 HD Wageningen the Netherlands tel: (+)31 317 485788 fax: (+)31 317 483342 internet: http://nutrigene.4t.com <http: nutrigene.4t.com=""/> email: guido.hooiveld@wur.nl [[alternative HTML version deleted]]
moe430a multtest affy limma • 657 views
ADD COMMENTlink
written 9.7 years ago by Guido Hooiveld2.4k
Please log in to add an answer.

Content
Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 353 users visited in the last hour