I am working on a dataset previously read in using methylumIDAT. As this results in a MethylumiSet object, I am wondering whether it is valid to convert this to an RGChannelSet using methylumi:::methylumiToMinfi in order to normalise using the preprocessXXX functions available in the minfi library?
You seem to be asking two questions simultaneously.
Should I use an un-exported function to do something?
Is it valid to do something that a package specifically has functions designed to accomplish?
The answer to #1 is usually no. Unexported functions are not exported for a reason. The conventional way to convert would be to follow the instructions in the vignette, in section 4, an example of which would be (using the data used in that vignette):
> library(methylumi)
> library(FDb.InfiniumMethylation.hg19)
> library(TCGAMethylation450k)
> idatPath <- system.file("extdata/idat", package = "TCGAMethylation450k")
> mset450k <- methylumIDAT(getBarcodes(path = idatPath), idatPath = idatPath)
0 HumanMethylation27 samples found
10 HumanMethylation450 samples found
Attempting to extract protocolData() from list...
Determining chip type from IDAT protocolData...
> rgset <- as(mset450k, "RGChannelSet")
Loading required package: rtracklayer
Fetching coordinates for hg19...
> rgset
class: RGChannelSet
dim: 621928 10
metadata(0):
assays(2): Green Red
rownames(621928): 14782418 12709357 ... 28673402 13742412
rowData names(0):
colnames(10): 6005486014_R01C01 6005486014_R02C02 ... 6005486023_R04C02
6005486023_R05C01
colData names(1): barcode
Annotation
array: IlluminaHumanMethylation450k
As for question #2, I think the answer has to be sure, why not?