I am trying to estimate A/B compartments using minfi's compartments function. The data I have is from whole blood samples, so I want to correct for cellular heterogeneity first. I have done this using minfi's estimateCellCounts function with the option returnAll = TRUE.
This returns data corrected for cell counts in the form of a GenomicRatioSet. I can see from Fortin and Hansen's (2016) paper describing the use of methylation data to predict A/B compartments that it is recommended to normalise the data first using functional normalisation.
The minfi function preprocessFunNorm takes an RGChannelSet as input. Is there a way that I can convert the GenomicRatioSet created after correcting for cellular heterogeneity into an RGChannelSet to use in preprocessFunNorm. If not, does anyone have any recommendations for other approaches to pre-processing of whole blood methylation data prior to estimating A/B compartments?
Example code:
x <- minfi::estimateCellCounts(RGset, returnAll=TRUE, verbose=TRUE)
x is a list of 3 objects:
- counts : num
- compTable :'data.frame'
- normalizedData:Formal class 'GenomicRatioSet'