I downloaded some IDAT files from GEO and was preprocessing the methylation data before integrating phenotype data. I got this error with estimateCellCounts():
[estimateCellCounts] Combining user data with reference (flow sorted) data.
Error in `*tmp*`[1, ] : incorrect number of dimensions
I dug into the issue and figured out the cause. When combining the user's RGChannelSet with the reference RGChannelSet, .harmonizeDataFrames() makes a list of variables unique to the user's RGChannelSet phenotype data and a list of variables unique to the reference package RGChannelSet phenotype data, x.only and y.only.
If either x.only or y.only is of length 1, df.add is a character vector of length 1 instead of a data frame and the function gives the error above. I ended up adding a dummy variable to my pData() object to force it to have 2 unique variables, but the issue could be fixed in the package by replacing df.add <- x[1, x.only] with df.add <- x[1, x.only,drop=FALSE] and df.add <- y[1, y.only] with df.add <- y[1, y.only, drop=FALSE].
I downloaded some IDAT files from GEO and was preprocessing the methylation data before integrating phenotype data. I got this error with estimateCellCounts():
I dug into the issue and figured out the cause. When combining the user's RGChannelSet with the reference RGChannelSet, .harmonizeDataFrames() makes a list of variables unique to the user's RGChannelSet phenotype data and a list of variables unique to the reference package RGChannelSet phenotype data, x.only and y.only.
If either x.only or y.only is of length 1, df.add is a character vector of length 1 instead of a data frame and the function gives the error above. I ended up adding a dummy variable to my pData() object to force it to have 2 unique variables, but the issue could be fixed in the package by replacing
df.add <- x[1, x.only]
withdf.add <- x[1, x.only,drop=FALSE]
anddf.add <- y[1, y.only]
withdf.add <- y[1, y.only, drop=FALSE]
.