calculateDiffMeth() and covariates error

182 views
Skip to first unread message

jeremy le luyer

unread,
Oct 8, 2016, 9:21:27 AM10/8/16
to methylkit_discussion
Hi everyone,

I recently started using methylKit. Everything went fine when running standard comparative analysis as well as dataSim. Yet, I tried to add covariates to the test and I got an error in calculateDiffMeth():

> normalize=normalizeCoverage(myobj)


> filtered.myobj=filterByCoverage(normalize,lo.count=10,lo.perc=NULL,

 +                                     hi.count=NULL,hi.perc=99.9)


> meth=unite(filtered.myobj, destrand=FALSE,min.per.group=14L)


> covariates=data.frame(stream=c(rep("cap",20),rep("qui",19)))


> myDiff=calculateDiffMeth(meth,covariates=covariates,num.cores=5)


Error in data.frame(..., check.names = FALSE) : 

  arguments imply differing number of rows: 34, 39


My dataset is made of 39 individuals as is my covariates df. I'm not sure where is the problem here ?


Thanks


Jérémy

Altuna Akalin

unread,
Oct 8, 2016, 11:14:58 AM10/8/16
to methylkit_...@googlegroups.com
You have NA values in your data since you are using "min.per.group=14L". This causes in certain cases discrepancy between covariates df and the data with methylation values.

If you have too few CpGs that are covered in all samples you can try to use tiles or regional analysis to get regions that have coverage in all samples.

Best,
Altuna


--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discussion+unsub...@googlegroups.com.
To post to this group, send email to methylkit_discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/methylkit_discussion.
For more options, visit https://groups.google.com/d/optout.

jeremy le luyer

unread,
Oct 8, 2016, 11:23:57 AM10/8/16
to methylkit_discussion
Hi,

Thanks you for your quick reply. Yes it does work indeed.

I'll also try running tile analysis as suggested. I am not sure what is the difference between using tiling in methylkit and edmr ?

Best

Altuna Akalin

unread,
Oct 8, 2016, 11:38:18 AM10/8/16
to methylkit_...@googlegroups.com
tile or regional analysis summarizes all methylation information to pre-defined regions which is followed by differential methylation analysis. edmr tries to combine differentially methylated CpGs based on spatial proximity and creates differentially methylated regions with different sizes.

Best,
Altuna

--
Reply all
Reply to author
Forward
0 new messages