HCBravoLab / metagenomeSeq

Statistical analysis for sparse high-throughput sequencing
64 stars 20 forks source link

MRfulltable Error: $ operator not defined for this S4 class #73

Closed kviljoen closed 5 years ago

kviljoen commented 5 years ago

Hi there,

With the latest version of metagenomeSeq (metagenomeSeq_1.26.2) running on R 3.6.0 macOS High Sierra 10.13.6 I get the error: MRfulltable Error: $ operator not defined for this S4 class which has never come up in the past. This is even when using the example code in the help function: data(lungData) k = grep("Extraction.Control",pData(lungData)$SampleType) lungTrim = lungData[,-k] lungTrim=filterData(lungTrim,present=30) lungTrim=cumNorm(lungTrim,p=0.5) smokingStatus = pData(lungTrim)$SmokingStatus mod = model.matrix(~smokingStatus) fit = fitZig(obj = lungTrim,mod=mod) head(MRfulltable(fit))

hcorrada commented 5 years ago

Thank you for writing. We've pushed a fix for this in both release and devel versions in Bioconductor. For release, this will be on version 1.26.3. This will be available on the Bioc build tomorrow. In the meantime, function MRtable provides the same functionality and is working on current versions.

Thanks again.

kviljoen commented 5 years ago

@hcorrada that's great, thanks for the prompt response! I've installed the devel version with install_github(repo="HCBravoLab/metagenomeSeq") but am still getting another error with fitZig() line in the above example (which is present in v 1.26 as well), not sure if it's related:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘sampleNames’ for signature ‘"MRexperiment"’

Similar problem with the cumNorm function with:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘featureNames’ for signature ‘"environment"’

And then the help files appear to have an issue with:

Error in fetch(key) : lazy-load database '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/metagenomeSeq/help/metagenomeSeq.rdb' is corrupt

dombraccia commented 5 years ago

@kviljoen Could you print your session info and comment it here?

dombraccia commented 5 years ago

@kviljoen Also, I noticed that when I run devtools::install_github(repo="HCBravoLab/metagenomeSeq") locally, it checks out the master branch from github:

install_github(repo="HCBravoLab/metagenomeSeq") Downloading GitHub repo HCBravoLab/metagenomeSeq@master

Instead, try doing what @hcorrada suggested earlier and updating / reinstalling to the latest Bioc build, which should include the changes to MRfulltable that you need.

Let me know if this works for you or if you need any more help.

kviljoen commented 5 years ago

Hi @dombraccia Thank you. Here is my sessionInfo()

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] devtools_2.1.0 usethis_1.5.1 gridExtra_2.3 caret_6.0-84
[5] ROCR_1.0-7 gplots_3.0.1.1 dplyr_0.8.3 randomForest_4.6-14 [9] psych_1.8.12 corrplot_0.84 ggplot2_3.2.0 vegan_2.5-5
[13] lattice_0.20-38 permute_0.9-5 NMF_0.23.6 cluster_2.1.0
[17] rngtools_1.4 pkgmaker_0.27 registry_0.5-1 phyloseq_1.28.0
[21] metagenomeSeq_1.27.3 RColorBrewer_1.1-2 glmnet_2.0-18 foreach_1.4.7
[25] Matrix_1.2-17 limma_3.40.6 Biobase_2.44.0 BiocGenerics_0.30.0

The latest version on Bioconductor is still 1.26.2 if I install via BiocManager

dombraccia commented 5 years ago

Try:

install_github("HCBravoLab/metagenomeSeq", ref = "RELEASE_3_9")

to get the most up to date version.

kviljoen commented 5 years ago

Thank you @dombraccia all issues solved with install_github("HCBravoLab/metagenomeSeq", ref = "RELEASE_3_9")