how to do a paired analysis with minfi?
3
0
Entering edit mode
@pablo-marin-garcia-6030
Last seen 5.1 years ago
United Kingdom
I have been using minfi for doing differential methylation analysis, and now I have some studies with paired samples. Do minfi have a way of defining a paired analysis both in the categorical and continuous dmpFinder analysis? Under the hood minfi uses limma, so one possibility is to use the code of dmpFinder and modify to do paired contrasts (well first I would need to refresh how to do this contrast in limma). I have a classical followup design study: treatment_A-basal treatment_A-xyears treatmen_B-basal treatment_B-xyears Where basal and xyears for each treatment have the same samples If minfi does not have the ability to do the paired analysis, could I have some pointers how to do it with limma. Probably I am wrong bu,t by the nature of the chip design, should I follow the limma examples in the vignette for one color array? [[alternative HTML version deleted]]
limma minfi limma minfi • 2.0k views
ADD COMMENT
0
Entering edit mode
@kasper-daniel-hansen-2979
Last seen 10 months ago
United States
Following the examples in the limma vignette regarding paired analysis for one-color arrays is exactly what you should do. Kasper On Mon, Jul 8, 2013 at 2:56 AM, Pablo marin-garcia <harpactocrates@gmail.com> wrote: > I have been using minfi for doing differential methylation analysis, and > now I have some studies with paired samples. > > Do minfi have a way of defining a paired analysis both in the categorical > and continuous dmpFinder analysis? > > Under the hood minfi uses limma, so one possibility is to use the code of > dmpFinder and modify to do paired contrasts (well first I would need to > refresh how to do this contrast in limma). > > I have a classical followup design study: > > treatment_A-basal > treatment_A-xyears > treatmen_B-basal > treatment_B-xyears > > Where basal and xyears for each treatment have the same samples > > If minfi does not have the ability to do the paired analysis, could I have > some pointers how to do it with limma. Probably I am wrong bu,t by the > nature of the chip design, should I follow the limma examples in the > vignette for one color array? > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@kristian-almstrup-3752
Last seen 4.5 years ago
Denmark

This is an old post but it did not reveal how to do the paired analysis with dmpFinder. When I try with my own data I get an error re the length of pheno. However looking at the length of beta and pheno both show 102 samples. What am I missing...?

Thanks.

Kristian 

> person<-factor(pd$person)
> time<-factor(pd$time, levels=c("1","2"))
> pheno<-model.matrix(~person+time)
> dmpFinder(beta, pheno=pheno, type = "categorical", qCutoff = 1)->paired
Error in dmpFinder(beta, pheno = design, type = "categorical", qCutoff = 1) : 
  length of pheno does not equal number of samples

> str(beta)
 num [1:467971, 1:102] 0.8239 0.6063 0.0693 0.1704 0.0586 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:467971] "cg13869341" "cg14008030" "cg12045430" "cg20826792" ...
  ..$ : chr [1:102] "3999840155_R05C01" "3999840155_R04C02" "3999840091_R02C02" "3999840097_R03C02" ...
> str(pheno)
 num [1:102, 1:52] 1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:102] "1" "2" "3" "4" ...
  ..$ : chr [1:52] "(Intercept)" "personB02" "personB03" "personB04" ...
 - attr(*, "assign")= int [1:52] 0 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "contrasts")=List of 2
  ..$ person: chr "contr.treatment"
  ..$ time : chr "contr.treatment"

 

ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

You are missing the fact that the 'pheno' argument is intended to be a single factor, not a design matrix. I think the help page is pretty explicit about that. Anyway, dmpFinder() is just a wrapper to allow people to use limma without having to know how to use limma. For any more sophisticated analyses you should just forgo the wrapper and analyze using limma directly.

ADD COMMENT

Login before adding your answer.

Traffic: 715 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