Question: Error when generate mapToGenome
gravatar for michaelwxf2012
24 months ago by
michaelwxf20120 wrote:

When I learn the package minfi, I meet the error. It occurs when I generate mapToGenome using demo data MsetEx.



> 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

[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.


minfi granges • 601 views
ADD COMMENTlink modified 24 months ago by Peter Hickey460 • written 24 months ago by michaelwxf20120
Answer: Error when generate mapToGenome
gravatar for Peter Hickey
24 months ago by
Peter Hickey460
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Peter Hickey460 wrote:

Thank you for including the code and sessionInfo() in your question, which makes it easy to help you.

Based on your sessionInfo(), you are mixing packages from different Bioconductor versions: minfi, minfiData, IlluminaHumanMethylation450kanno.ilmn12.hg19, and IlluminaHumanMethylation450kmanifest are from the current release of Bioconductor but Biostrings, XVector, SummarizedExperiment, DelayedArray, Biobase, GenomicRanges, GenomeInfoDb, IRanges, S4Vectors, and BiocGenerics are all from the previous Bioconductor release and so are out-of-date. This mixing and matching of Bioconductor releases is not supported or recommended.

Please run the following code and follow the advice in the output (it will tell you which packages need update and perform the updating).


Then, try re-running your example. Hopefully it will then all work as intended!

Cheers, Pete

ADD COMMENTlink modified 24 months ago • written 24 months ago by Peter Hickey460

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.


ADD REPLYlink written 24 months ago by michaelwxf20120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 471 users visited in the last hour