hansenlab / minfi

Devel repository for minfi
58 stars 67 forks source link

unable to find an inherited method for function pData #174

Closed demis001 closed 5 years ago

demis001 commented 5 years ago

rgset <- read.metharray(bName, verbose = TRUE); pData(rgset) <- mom_samples Error:

unable to find an inherited method for function 'pData<-' for signature '"RGChannelSet", "data.frame"'

The code used to work in older version in 2017, any change with this version?

kasperdanielhansen commented 5 years ago

Hmm, it might be a problem on our end, but let's start with your end :)

What is the output of library(BiocManager) BiocManager::valid()

Best, Kasper

On Fri, Nov 16, 2018 at 12:26 PM Dereje Jima notifications@github.com wrote:

rgset <- read.metharray(bName, verbose = TRUE); pData(rgset) <- mom_samples Error:

unable to find an inherited method for function 'pData<-' for signature '"RGChannelSet", "data.frame"'

The code used work in older version in 2017, any change with this version?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hansenlab/minfi/issues/174, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuhn7Y_gyzWm0azGooMG4b7sXPQty2Jks5uvvVigaJpZM4YmqpJ .

demis001 commented 5 years ago

BiocManager::valid()

R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.1 LTS

Matrix products: default BLAS:$HOME/bin/R64/R-3.5.1/lib/R/lib/libRblas.so LAPACK: $HOME/bin/R64/R-3.5.1/lib/R/lib/libRlapack.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] BiocManager_1.30.4 BiocInstaller_1.32.1
[3] bindrcpp_0.2.2 ChAMP_2.12.0
[5] IlluminaHumanMethylationEPICmanifest_0.3.0 Illumina450ProbeVariants.db_1.18.0
[7] FEM_3.10.0 graph_1.60.0
[9] org.Hs.eg.db_3.7.0 impute_1.56.0
[11] igraph_1.2.2 corrplot_0.84
[13] marray_1.60.0 Matrix_1.2-15
[15] ChAMPdata_2.14.0 dplyr_0.7.8
[17] shinyMethyl_1.18.0 IlluminaHumanMethylation450kmanifest_0.4.0 [19] shiny_1.2.0 qqman_0.1.4
[21] GenomicFeatures_1.34.1 IlluminaHumanMethylation450kprobe_2.0.6
[23] AnnotationDbi_1.44.0 DMRcate_1.18.0
[25] DMRcatedata_1.18.0 DSS_2.30.0
[27] bsseq_1.18.0 limma_3.38.2
[29] sva_3.30.0 genefilter_1.64.0
[31] mgcv_1.8-25 nlme_3.1-137
[33] minfi_1.28.0 bumphunter_1.24.4
[35] locfit_1.5-9.1 iterators_1.0.10
[37] foreach_1.4.4 Biostrings_2.50.1
[39] XVector_0.22.0 SummarizedExperiment_1.12.0
[41] DelayedArray_0.8.0 BiocParallel_1.16.0
[43] matrixStats_0.54.0 Biobase_2.42.0
[45] GenomicRanges_1.34.0 GenomeInfoDb_1.18.1
[47] IRanges_2.16.0 S4Vectors_0.20.1
[49] BiocGenerics_0.28.0 biomaRt_2.38.0

loaded via a namespace (and not attached): [1] rtracklayer_1.42.0
[2] prabclus_2.2-6
[3] R.methodsS3_1.7.1
[4] wateRmelon_1.26.0
[5] pkgmaker_0.27
[6] tidyr_0.8.2
[7] ggplot2_3.1.0
[8] acepack_1.4.1
[9] bit64_0.9-7
[10] knitr_1.20
[11] R.utils_2.7.0
[12] data.table_1.11.8
[13] rpart_4.1-13
[14] RCurl_1.95-4.11
[15] GEOquery_2.50.0
[16] AnnotationFilter_1.6.0
[17] doParallel_1.0.14
[18] preprocessCore_1.44.0
[19] RSQLite_2.1.1
[20] combinat_0.0-8
[21] bit_1.1-14
[22] xml2_1.2.0
[23] httpuv_1.4.5
[24] assertthat_0.2.0
[25] viridis_0.5.1
[26] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0 [27] isva_1.9
[28] hms_0.4.2
[29] evaluate_0.12
[30] missMethyl_1.16.0
[31] DNAcopy_1.56.0
[32] promises_1.0.1
[33] DEoptimR_1.0-8
[34] progress_1.2.0
[35] dendextend_1.9.0
[36] DBI_1.0.0
[37] geneplotter_1.60.0
[38] htmlwidgets_1.3
[39] reshape_0.8.8
[40] purrr_0.2.5
[41] ROC_1.58.0
[42] ggpubr_0.2
[43] backports_1.1.2
[44] trimcluster_0.1-2.1
[45] permute_0.9-4
[46] calibrate_1.7.2
[47] annotate_1.60.0
[48] ensembldb_2.6.2
[49] withr_2.1.2
[50] globaltest_5.36.0
[51] Gviz_1.26.0
[52] robustbase_0.93-3
[53] BSgenome_1.50.0
[54] checkmate_1.8.5
[55] GenomicAlignments_1.18.0
[56] prettyunits_1.0.2
[57] mclust_5.4.1
[58] cluster_2.0.7-1
[59] RPMM_1.25
[60] lazyeval_0.2.1
[61] crayon_1.3.4
[62] pkgconfig_2.0.2
[63] ProtGenerics_1.14.0
[64] nnet_7.3-12
[65] diptest_0.75-7
[66] bindr_0.1.1
[67] rlang_0.3.0.1
[68] nleqslv_3.3.2
[69] registry_0.5
[70] affyio_1.52.0
[71] dichromat_2.0-0
[72] rprojroot_1.3-2
[73] rngtools_1.3.1
[74] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0 [75] base64_2.0
[76] Rhdf5lib_1.4.0
[77] base64enc_0.1-3
[78] geneLenDataBase_1.18.0
[79] whisker_0.3-2
[80] viridisLite_0.3.0
[81] bitops_1.0-6
[82] R.oo_1.22.0
[83] KernSmooth_2.23-15
[84] blob_1.1.1
[85] DelayedMatrixStats_1.4.0
[86] doRNG_1.7.1
[87] stringr_1.3.1
[88] qvalue_2.14.0
[89] nor1mix_1.2-3
[90] readr_1.1.1
[91] scales_1.0.0
[92] memoise_1.1.0
[93] magrittr_1.5
[94] plyr_1.8.4
[95] bibtex_0.4.2
[96] zlibbioc_1.28.0
[97] compiler_3.5.1
[98] factoextra_1.0.5
[99] RColorBrewer_1.1-2
[100] illuminaio_0.24.0
[101] clue_0.3-56
[102] DESeq2_1.22.1
[103] Rsamtools_1.34.0
[104] affy_1.60.0
[105] JADE_2.0-1
[106] IlluminaHumanMethylationEPICanno.ilm10b2.hg19_0.6.0 [107] htmlTable_1.12
[108] Formula_1.2-3
[109] MASS_7.3-51.1
[110] tidyselect_0.2.5
[111] stringi_1.2.4
[112] yaml_2.2.0
[113] latticeExtra_0.6-28
[114] ggrepel_0.8.0
[115] grid_3.5.1
[116] VariantAnnotation_1.28.1
[117] tools_3.5.1
[118] ruv_0.9.7
[119] rstudioapi_0.8
[120] foreign_0.8-71
[121] gridExtra_2.3
[122] digest_0.6.18
[123] quadprog_1.5-5
[124] fpc_2.1-11.1
[125] Rcpp_1.0.0
[126] siggenes_1.56.0
[127] later_0.7.5
[128] httr_1.3.1
[129] biovizBase_1.30.0
[130] lumi_2.34.0
[131] kernlab_0.9-27
[132] colorspace_1.3-2
[133] XML_3.98-1.16
[134] statmod_1.4.30
[135] multtest_2.38.0
[136] shinythemes_1.1.2
[137] flexmix_2.3-14
[138] plotly_4.8.0
[139] xtable_1.8-3
[140] jsonlite_1.5
[141] modeltools_0.2-22
[142] R6_2.3.0
[143] Hmisc_4.1-1
[144] pillar_1.3.0
[145] htmltools_0.3.6
[146] mime_0.6
[147] glue_1.3.0
[148] class_7.3-14
[149] beanplot_1.2
[150] codetools_0.2-15
[151] mvtnorm_1.0-8
[152] lattice_0.20-38
[153] tibble_1.4.2
[154] curl_3.2
[155] BiasedUrn_1.07
[156] gtools_3.8.1
[157] GO.db_3.7.0
[158] openssl_1.1
[159] survival_2.43-1
[160] rmarkdown_1.10
[161] methylumi_2.28.0
[162] fastICA_1.2-1
[163] munsell_0.5.0
[164] rhdf5_2.26.0
[165] GenomeInfoDbData_1.2.0
[166] goseq_1.34.0
[167] HDF5Array_1.10.0
[168] reshape2_1.4.3
[169] gtable_0.2.0

Bioconductor version '3.8'

create a valid installation with

BiocManager::install("broman", update = TRUE, ask = FALSE)

more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date

Warning message: 0 packages out-of-date; 1 packages too new

demis001 commented 5 years ago

By the way, I have installed both from Bioconductor Repo and the github versions. Both gave me the same error. I don't see the pData class too:

"In the older version, it says the pData inherited from the eset and updated the biobase and loaded, but didn't solve the problem"

showClass("RGChannelSet") Class "RGChannelSet" [package "minfi"]

Slots:

Name: annotation colData assays NAMES elementMetadata Class: character DataFrame Assays character_OR_NULL DataFrame

Name: metadata Class: list

Extends: Class "SummarizedExperiment", directly Class "Vector", by class "SummarizedExperiment", distance 2 Class "Annotated", by class "SummarizedExperiment", distance 3

Known Subclasses: "RGChannelSetExtended"

demis001 commented 5 years ago

pD<-as(mom_samples, "DataFrame"); pData(rgset) <- pD

kasperdanielhansen commented 5 years ago

Do you think I should add a data.frame method? The move from data.frame to DataFrame is caused by switching from eSet to SummarizedExperiment as our main class backend. This switch was made because it opens up some very important possibilities and also simplifies certain things. But it also has consequences such as this.

(also, the modern way would be to use colData() instead of pData() - pData is a leftover from eSet, in SummarizedExperiment and friends it is called colData)

On Mon, Nov 19, 2018 at 12:20 PM Dereje Jima notifications@github.com wrote:

pD<-as(mom_samples, "DataFrame"); pData(rgset) <- pD

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hansenlab/minfi/issues/174#issuecomment-439972707, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuhn1JptHLt8l0IsBrhNt4cBKUokDDIks5uwuhjgaJpZM4YmqpJ .

wvictor14 commented 5 years ago

I prefer working with tibbles when my pData becomes large and will often run into these types of errors. I think a more explicit error message than what we see now could be an option:

unable to find an inherited method for function 'pData<-' for signature '"RGChannelSet", "data.frame"'

to something like:

class "data.frame" not supported. Please provide a DataFrame object