waldronlab / SingleCellMultiModal

Single Cell multimodal data scripts for downloading datasets
https://bioconductor.org/packages/SingleCellMultiModal
17 stars 9 forks source link

scNMT: invalid name for slot of class "ExperimentHub": dataType #22

Closed aljabadi closed 4 years ago

aljabadi commented 4 years ago

@LiNk-NY trying to re-load the scNMT-seq data I get:

library(SingleCellMultiModal)
#> Loading required package: MultiAssayExperiment
#> Loading required package: SummarizedExperiment
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#> 
#> Attaching package: 'MatrixGenerics'
#> The following objects are masked from 'package:matrixStats':
#> 
#>     colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#>     colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#>     colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#>     colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#>     colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#>     colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#>     colWeightedMeans, colWeightedMedians, colWeightedSds,
#>     colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#>     rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#>     rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#>     rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#>     rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#>     rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#>     rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#>     rowWeightedSds, rowWeightedVars
#> Loading required package: GenomicRanges
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: parallel
#> 
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:parallel':
#> 
#>     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
#>     clusterExport, clusterMap, parApply, parCapply, parLapply,
#>     parLapplyLB, parRapply, parSapply, parSapplyLB
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     anyDuplicated, append, as.data.frame, basename, cbind, colnames,
#>     dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
#>     grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
#>     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
#>     rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
#>     union, unique, unsplit, which.max, which.min
#> Loading required package: S4Vectors
#> 
#> Attaching package: 'S4Vectors'
#> The following object is masked from 'package:base':
#> 
#>     expand.grid
#> Loading required package: IRanges
#> Loading required package: GenomeInfoDb
#> Loading required package: Biobase
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
#> 
#> Attaching package: 'Biobase'
#> The following object is masked from 'package:MatrixGenerics':
#> 
#>     rowMedians
#> The following objects are masked from 'package:matrixStats':
#> 
#>     anyMissing, rowMedians
gastru.mae <- scNMT(dataType = 'mouse_gastrulation', modes = '*', version = '2.0.0', dry.run = FALSE)
#> Error in initialize(value, ...): invalid name for slot of class "ExperimentHub": dataType

Looking down the stack the problem seems to be caused by passing a dataType arg to ExperimentHub constructor:

new('ExperimentHub', dataType='dataType')
#>  invalid name for slot of class "ExperimentHub": dataType

I looked at ?ExperimentHub-class but unfortunately didn’t see any straightforward clarification as to what this class actually expects in threedots.

Created on 2020-11-27 by the reprex package (v0.3.0)

Session info ``` r devtools::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.3 (2020-10-10) #> os macOS Catalina 10.15 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_AU.UTF-8 #> ctype en_AU.UTF-8 #> tz Australia/Melbourne #> date 2020-11-27 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> AnnotationDbi 1.52.0 2020-10-27 [1] Bioconductor #> AnnotationHub 2.22.0 2020-10-27 [1] Bioconductor #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0) #> Biobase * 2.50.0 2020-10-27 [1] Bioconductor #> BiocFileCache 1.14.0 2020-10-27 [1] Bioconductor #> BiocGenerics * 0.36.0 2020-10-27 [1] Bioconductor #> BiocManager 1.30.10 2019-11-16 [1] CRAN (R 4.0.0) #> BiocVersion 3.12.0 2020-05-14 [1] Bioconductor #> bit 4.0.4 2020-08-04 [1] CRAN (R 4.0.2) #> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.0.2) #> bitops 1.0-6 2013-08-17 [1] CRAN (R 4.0.0) #> blob 1.2.1 2020-01-20 [1] CRAN (R 4.0.0) #> callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.2) #> cli 2.2.0 2020-11-20 [1] CRAN (R 4.0.2) #> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.0) #> curl 4.3 2019-12-02 [1] CRAN (R 4.0.0) #> DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.0) #> dbplyr 2.0.0 2020-11-03 [1] CRAN (R 4.0.2) #> DelayedArray 0.16.0 2020-10-27 [1] Bioconductor #> desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0) #> devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.2) #> digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.2) #> dplyr 1.0.2 2020-08-18 [1] CRAN (R 4.0.2) #> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.0) #> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0) #> ExperimentHub 1.16.0 2020-10-27 [1] Bioconductor #> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.0) #> fastmap 1.0.1 2019-10-08 [1] CRAN (R 4.0.0) #> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2) #> generics 0.1.0 2020-10-31 [1] CRAN (R 4.0.2) #> GenomeInfoDb * 1.26.1 2020-11-18 [1] Bioconductor #> GenomeInfoDbData 1.2.4 2020-10-09 [1] Bioconductor #> GenomicRanges * 1.42.0 2020-10-27 [1] Bioconductor #> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2) #> highr 0.8 2019-03-20 [1] CRAN (R 4.0.0) #> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2) #> httpuv 1.5.4 2020-06-06 [1] CRAN (R 4.0.2) #> httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2) #> interactiveDisplayBase 1.28.0 2020-10-27 [1] Bioconductor #> IRanges * 2.24.0 2020-10-27 [1] Bioconductor #> knitr 1.30 2020-09-22 [1] CRAN (R 4.0.2) #> later 1.1.0.1 2020-06-05 [1] CRAN (R 4.0.2) #> lattice 0.20-41 2020-04-02 [1] CRAN (R 4.0.3) #> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.0) #> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.2) #> Matrix 1.2-18 2019-11-27 [1] CRAN (R 4.0.3) #> MatrixGenerics * 1.2.0 2020-10-27 [1] Bioconductor #> matrixStats * 0.57.0 2020-09-25 [1] CRAN (R 4.0.2) #> memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0) #> mime 0.9 2020-02-04 [1] CRAN (R 4.0.0) #> MultiAssayExperiment * 1.16.0 2020-10-27 [1] Bioconductor #> pillar 1.4.7 2020-11-20 [1] CRAN (R 4.0.2) #> pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.0) #> pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.2) #> prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0) #> processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2) #> promises 1.1.1 2020-06-09 [1] CRAN (R 4.0.2) #> ps 1.4.0 2020-10-07 [1] CRAN (R 4.0.2) #> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.0) #> R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.2) #> rappdirs 0.3.1 2016-03-28 [1] CRAN (R 4.0.0) #> Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2) #> RCurl 1.98-1.2 2020-04-18 [1] CRAN (R 4.0.0) #> remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2) #> rlang 0.4.9 2020-11-26 [1] CRAN (R 4.0.2) #> rmarkdown 2.5 2020-10-21 [1] CRAN (R 4.0.2) #> rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.2) #> RSQLite 2.2.1 2020-09-30 [1] CRAN (R 4.0.2) #> S4Vectors * 0.28.0 2020-10-27 [1] Bioconductor #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0) #> shiny 1.5.0 2020-06-23 [1] CRAN (R 4.0.2) #> SingleCellExperiment 1.12.0 2020-10-27 [1] Bioconductor #> SingleCellMultiModal * 1.2.2 2020-11-09 [1] Bioconductor #> SpatialExperiment 1.0.0 2020-10-27 [1] Bioconductor #> stringi 1.5.3 2020-09-09 [1] CRAN (R 4.0.2) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.0) #> SummarizedExperiment * 1.20.0 2020-10-27 [1] Bioconductor #> testthat 3.0.0 2020-10-31 [1] CRAN (R 4.0.2) #> tibble 3.0.4 2020-10-12 [1] CRAN (R 4.0.2) #> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.0) #> usethis 1.6.3 2020-09-17 [1] CRAN (R 4.0.2) #> vctrs 0.3.5 2020-11-17 [1] CRAN (R 4.0.2) #> withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.2) #> xfun 0.19 2020-10-30 [1] CRAN (R 4.0.2) #> xtable 1.8-4 2019-04-21 [1] CRAN (R 4.0.0) #> XVector 0.30.0 2020-10-28 [1] Bioconductor #> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0) #> zlibbioc 1.36.0 2020-10-28 [1] Bioconductor #> #> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library ```
LiNk-NY commented 4 years ago

Hi Al, @ajabadi Thanks for reporting this! I will look into it today. -Marcel

LiNk-NY commented 4 years ago

Hi Al, @ajabadi

I had a look at this and it appears that dataType should be DataType in the function call. We can run a check for all the arguments in the call (since we do collect the arguments) and provide a more helpful error message but it seems to me that this would be "too clever".

Let me know if this helps! Best, Marcel

aljabadi commented 4 years ago

Hi Marcel, @LiNk-NY

Thanks for the quick reply and sorry for this trivial oversight. I thought this code had worked in the past but I guess I had misspelled and never had it checked.

I agree, that sort of error catching for a function that takes ... would in fact be too clever :).

Best, Al

LiNk-NY commented 4 years ago

It's not your fault. I remember now that I changed the case in the argument to match the metadata some time ago before the release. :sweat_smile: https://github.com/waldronlab/SingleCellMultiModal/commit/907274e86ce61995002e96836a569c4a73cd72de