hansenlab / minfi

Devel repository for minfi
58 stars 70 forks source link

.cpgCollapse’ for signature ‘"data.frame" #184

Open yeswzc opened 5 years ago

yeswzc commented 5 years ago

Hi, I want to collapse 450K beta values from TCGA data using cpgCollapse. But I get the error message:

[cpgCollapse] Creating annotation.

[cpgCollapseAnnotation] Clustering islands and clusters of probes.

[cpgCollapseAnnotation] Computing new annotation.

[cpgCollapseAnnotation] Defining blocks.

[cpgCollapse] Collapsing data
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘.cpgCollapse’ for signature ‘"data.frame"’

I run minfi like this:

library(minfi)
library(minfiData)
data = read.table(gzfile("HumanMethylation450.gz"),head=T)
rownames(data) = data[,1]
data = data[,-1]
Rset = RatioSet(Beta =data)

annotation(Rset) = annotation(MsetEx)
GRset <- mapToGenome(Rset)

collap = cpgCollapse(GRset, what = "Beta", maxGap = 500,
            blockMaxGap = 2.5 * 10^5, maxClusterWidth = 1500,
            dataSummary = colMeans, na.rm = FALSE,
            returnBlockInfo = TRUE, islandAnno = NULL, verbose = TRUE)

Could you help me to figure this out? Thanks very much!