drighelli / SpatialExperiment

55 stars 20 forks source link

Request to export "SpatialExperiment" class #38

Closed irzamsarfraz closed 3 years ago

irzamsarfraz commented 3 years ago

Dear maintainers,

We have been working on an R package (ExperimentSubset) that allows efficient storage and retrieval of subsets of Experiment data that particularly focuses on provenance tracking. For now, an older version of the package is available with the Bioconductor 3.12 release that essentially converts all data to "SingleCellExperiment" class. However, over the past couple of month we have been improving upon this package by adding in drop-in replacement support for all Experiment classes by directly inheriting from these classes. So far, we have successfully added support for "SummarizedExperiment", "RangedSummarizedExperiment", "SingleCellExperiment" and "TreeSummarizedExperiment". To make sure that all available Experiment classes are supported by our package, we would like to make a request to the maintainers and authors of the package to export the "SpatialExperiment" class, so we can directly inherit from it and add support for subsets.

The requested feature can be seen in this commit made on the forked repo. The current version of our package can viewed at the devel branch of our "ExperimentSubset" package repo. Furthermore, we prototyped our package with older version of the "SpatialExperiment" classes, which can be seen on this readme file.

Additionally, while trying out the the package, particularly the current version of the master branch, we encountered the following error and could not proceed further: mse <- SingleCellMultiModal::seqFISH(DataType="mouse_visual_cortex", modes="*", dry.run=FALSE, version="2.0.0")

ExperimentList contains data.frame or DataFrame, potential for errors with mixed data types Error in SummarizedExperiment(...) : unused argument (spatialCoords = list(1:1597, c(100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 1

Best Regards, Irzam

drighelli commented 3 years ago

Hi Irzam @irzamsarfraz

this error is due to an old version of the SpatialExperiment class, if you install our class from the master branch here on github or from the devel version on Bioconductor you'll find our latest versions.

This will account for the error.

Keep in mind that we're exporting a single class now named SpatialExperiment while the VisiumExperiment is deprecated.

Thanks for pointing out that we've to export the SpatialExperiment class into the NAMESPACE, we'll do that!

Hope this will help you!

Dario

irzamsarfraz commented 3 years ago

Dear Dario,

Thanks for getting back to me quickly. I am actually getting this error by using the current version of the master branch. I am reluctant to use the bioconductor devel version since I can't directly export the class in this case.

mse <- SingleCellMultiModal::seqFISH(DataType="mouse_visual_cortex", modes="*", dry.run=FALSE, version="2.0.0")

snapshotDate(): 2020-10-27 Working on: scRNA_Counts Working on: scRNA_Labels Working on: seqFISH_Coordinates Working on: seqFISH_Counts Working on: seqFISH_Labels see ?SingleCellMultiModal and browseVignettes('SingleCellMultiModal') for documentation loading from cache see ?SingleCellMultiModal and browseVignettes('SingleCellMultiModal') for documentation loading from cache see ?SingleCellMultiModal and browseVignettes('SingleCellMultiModal') for documentation loading from cache see ?SingleCellMultiModal and browseVignettes('SingleCellMultiModal') for documentation loading from cache see ?SingleCellMultiModal and browseVignettes('SingleCellMultiModal') for documentation loading from cache ExperimentList contains data.frame or DataFrame, potential for errors with mixed data types Error in SummarizedExperiment(...) : unused argument (spatialCoords = list(1:1597, c(100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 1

sessionInfo()

R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages: [1] SingleCellMultiModal_1.2.4 MultiAssayExperiment_1.16.0 SpatialExperiment_1.1.434 SingleCellExperiment_1.12.0 [5] SummarizedExperiment_1.20.0 Biobase_2.50.0 GenomicRanges_1.42.0 GenomeInfoDb_1.26.0
[9] IRanges_2.24.0 S4Vectors_0.28.0 BiocGenerics_0.36.0 MatrixGenerics_1.2.0
[13] matrixStats_0.57.0
loaded via a namespace (and not attached): [1] httr_1.4.2 edgeR_3.32.0 bit64_4.0.5 AnnotationHub_2.22.0
[5] DelayedMatrixStats_1.12.0 scuttle_1.0.0 R.utils_2.10.1 shiny_1.5.0
[9] assertthat_0.2.1 interactiveDisplayBase_1.28.0 BiocManager_1.30.10 BiocFileCache_1.14.0
[13] dqrng_0.2.1 blob_1.2.1 GenomeInfoDbData_1.2.4 yaml_2.2.1
[17] BiocVersion_3.12.0 pillar_1.4.6 RSQLite_2.2.1 lattice_0.20-41
[21] glue_1.4.2 limma_3.46.0 beachmat_2.6.0 digest_0.6.27
[25] promises_1.1.1 XVector_0.30.0 httpuv_1.5.4 htmltools_0.5.0
[29] Matrix_1.2-18 R.oo_1.24.0 pkgconfig_2.0.3 magick_2.5.0
[33] zlibbioc_1.36.0 xtable_1.8-4 purrr_0.3.4 HDF5Array_1.18.0
[37] later_1.1.0.1 BiocParallel_1.24.0 tibble_3.0.4 generics_0.1.0
[41] ellipsis_0.3.1 withr_2.3.0 mime_0.9 magrittr_1.5
[45] crayon_1.3.4 memoise_1.1.0 R.methodsS3_1.8.1 tools_4.0.3
[49] lifecycle_0.2.0 Rhdf5lib_1.12.0 DropletUtils_1.10.0 locfit_1.5-9.4
[53] DelayedArray_0.16.0 AnnotationDbi_1.52.0 compiler_4.0.3 rlang_0.4.8
[57] rhdf5_2.34.0 grid_4.0.3 RCurl_1.98-1.2 rhdf5filters_1.2.0
[61] rstudioapi_0.11 rjson_0.2.20 rappdirs_0.3.1 bitops_1.0-6
[65] ExperimentHub_1.16.0 DBI_1.1.0 curl_4.3 R6_2.5.0
[69] dplyr_1.0.2 fastmap_1.0.1 bit_4.0.4 Rcpp_1.0.5
[73] vctrs_0.3.4 dbplyr_2.0.0 tidyselect_1.1.0 sparseMatrixStats_1.2.0

Thanks for all the help!

Best, Irzam

drighelli commented 3 years ago

@irzamsarfraz please notice that you're using the bioconductor release version of the SingleCellMultiModal package.

Are you using the bioconductor devel version? It's a good rule of thumb to work with it when developing new packages, to have all the latest version of your dependencies...

Dario

drighelli commented 3 years ago

@irzamsarfraz may I ask you to create e PR for the class exporting stuff? Just because you already have it ready on your fork :)

irzamsarfraz commented 3 years ago

@drighelli

Thanks for all the help. This has solved the problem. I have made a pull request.

Best, Irzam

drighelli commented 3 years ago

@irzamsarfraz thanks, your PR has been merged!

Best, Dario