Error when generate mapToGenome
1
0
Entering edit mode
@michaelwxf2012-14463
Last seen 7.1 years ago

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.

 

minfi GRanges • 1.5k views
ADD COMMENT
3
Entering edit mode
Peter Hickey ▴ 740
@petehaitch
Last seen 7 weeks ago
WEHI, Melbourne, Australia

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

source("https://bioconductor.org/biocLite.R")
biocLite()
biocValid()

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

Cheers, Pete

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 940 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6