hansenlab / minfi

Devel repository for minfi
58 stars 70 forks source link

estimateCellCounts error #185

Closed ruizhang3333 closed 5 years ago

ruizhang3333 commented 5 years ago

Dear Colleagues, I have tried many times on the EPIC data as following:

CellCountsEstimation<-estimateCellCounts(RGset,compositeCellType="Blood",cellTypes=c("CD8T","CD4T","NK","Bcell","Mono","Gran"),referencePlatform=c("IlluminaHumanMethylationEPIC"))

Error in estimateCellCounts(RGset, compositeCellType = "Blood", cellTypes = c("CD8T", : ationEPIC")) all elements of argument 'cellTypes' needs to be part of the reference phenoData columns 'CellType' (containg the following elements: '') In addition: Warning message: In data(list = referencePkg) : data set 'FlowSorted.Blood.EPIC' not found

Since I am new to minfi, could anyone give me a hint about this issue? Thank you so much for your help in advance! Best, Rui

wvictor14 commented 5 years ago

Perhaps try installing the reference package, "FlowSorted.Blood.EPIC"?

kasperdanielhansen commented 5 years ago

Most of the reference packages are for the 450k array. Conceptually you need to use convertArray() to cast your EPIC data as 450k data. Following this, you can now use the standard 450k reference packages.

So start by something like

RGset.450k = convertArray(RGset, outType = "lluminaHumanMethylation450k")
ruizhang3333 commented 5 years ago

Thank you so very much for your great support, Dr. Hansen!!! RGset.450k = convertArray(RGset, outType = "IlluminaHumanMethylation450k") [convertArray] Casting as IlluminaHumanMethylation450k Loading required package: IlluminaHumanMethylation450kmanifest Loading required package: IlluminaHumanMethylationEPICmanifest

if (!requireNamespace("BiocManager", quietly = TRUE))

  • install.packages("BiocManager")

BiocManager::install("FlowSorted.Blood.450k") library(FlowSorted.Blood.450k) CellCountsEstimation<-estimateCellCounts(RGset.450k,compositeCellType="Blood",cellTypes=c("CD8T","CD4T","NK","Bcell","Mono","Gran")) [estimateCellCounts] Combining user data with reference (flow sorted) data. [estimateCellCounts] Processing user and reference data together. [preprocessQuantile] Mapping to genome. Loading required package: IlluminaHumanMethylation450kanno.ilmn12.hg19 [preprocessQuantile] Fixing outliers. [preprocessQuantile] Quantile normalizing. [estimateCellCounts] Picking probes for composition estimation. [estimateCellCounts] Estimating composition. Warning message: In DataFrame(sampleNames = c(colnames(rgSet), colnames(referenceRGset)), : 'stringsAsFactors' is ignored

kasperdanielhansen commented 5 years ago

You're welcome. Thanks for reporting back that it works. This is great for other people (and for me).