When I learn the package minfi, I meet the error. It occurs when I generate mapToGenome using demo data MsetEx.
>library("minfi") >library("minfiData")
> my.GMsetEx<-mapToGenome(MsetEx) Error in checkSlotAssignment(object, name, value) : assignment of an object of class “GRanges” is not valid for slot ‘rowRanges’ in an object of class “GenomicMethylSet”; is(value, "GenomicRanges_OR_GRangesList") is not TRUE
traceback() as followed
12: stop(gettextf("assignment of an object of class %s is not valid for slot %s in an object of class %s; is(value, \"%s\") is not TRUE", dQuote(valueClass), sQuote(name), dQuote(cl), slotClass), domain = NA) 11: checkSlotAssignment(object, name, value) 10: `slot<-`(`*tmp*`, what, value = slot(value, what)) 9: asMethod(object, Class, value) 8: `as<-`(`*tmp*`, Classi, value = obj) 7: initialize(value, ...) 6: initialize(value, ...) 5: new("GenomicMethylSet", SummarizedExperiment(assays = assays, rowRanges = as(gr, "GRanges"), ...), annotation = annotation, preprocessMethod = preprocessMethod) 4: GenomicMethylSet(gr = gr, Meth = getMeth(object), Unmeth = getUnmeth(object), colData = colData(object), preprocessMethod = preprocessMethod(object), annotation = annotation(object), metadata = metadata(object)) 3: .local(object, ...) 2: mapToGenome(MsetEx) 1: mapToGenome(MsetEx)
sessionInfo() as followed,
R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936 [3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C [5] LC_TIME=Chinese (Simplified)_China.936 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] minfiData_0.24.0 IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0 [3] IlluminaHumanMethylation450kmanifest_0.4.0 minfi_1.24.0 [5] bumphunter_1.20.0 locfit_1.5-9.1 [7] iterators_1.0.8 foreach_1.4.3 [9] Biostrings_2.44.2 XVector_0.16.0 [11] SummarizedExperiment_1.6.3 DelayedArray_0.2.7 [13] matrixStats_0.52.2 Biobase_2.36.2 [15] GenomicRanges_1.28.4 GenomeInfoDb_1.12.2 [17] IRanges_2.10.2 S4Vectors_0.14.3 [19] BiocGenerics_0.22.0
I am a new learner of R and bioinfornatics and always find problems. So I hope this one can be solved.
Dear Peter,
Thank you very much for your reply. It works well now. As a new R learner, I feel really warm and touched by your help. And I believe with you wonderful friends, I can go furthur and better in the field of bioinformatics.
Michael