I tried to follow https://bioconductor.org/packages/devel/workflows/vignettes/methylationArrayAnalysis/inst/doc/methylationArrayAnalysis.html#normalisation for the visualization of the results for the probe-wise analysis of my dataset. Regions plotted with the DMR.plot function (DMRcate package). However, I keep getting this error:
Error in .local(GdObject, ...) : 'groups' must be a vector of similar length as the number of rows in the data matrix (19)
GRset <- preprocessFunnorm(methylset)
betavals <- getBeta(GRset)
typeof(betavals)
betavals <- data.matrix(betavals)
disease <- c(UlcerativeColitis="magenta", Normal="forestgreen")
names(disease) <- levels(factor(met_annot$Characteristics.disease.))
cols <- disease[as.character(factor(met_annot$Characteristics.disease.))]
par(mfrow=c(1,1))
DMR.plot(ranges = results.ranges, dmr= 20, CpGs = GRset, phen.col = cols, what="Beta",
arraytype = "EPIC" )
I don't see what is going wrong here..
Thank you in advance!