drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
258 stars 98 forks source link

spatialDE is broken in Giotto_0.3.6 #57

Closed strauss-s closed 4 years ago

strauss-s commented 4 years ago

Hi,

There seem to be two issues: Running with defaults: >spatialDE(gobject = g) Error in t.default(expr_values) : argument is not a matrix

Running with normalized expression counts does work at first, but at the end: spatialDE(gobject = g,expression_values="normalized") Models: 0%| | 0/10 [00:00<?, ?it/s] ... Models: 100%|##########| 11/11 [00:00<00:00, 122.91it/s]Error in FSV_show(results = results, ms_results = ms_results, size = size, : could not find function "FSV_show"

Works with Giotto_0.1.4

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale: [1] C

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

other attached packages: [1] dplyr_1.0.0 data.table_1.12.8 Giotto_0.3.6

loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 pillar_1.4.4 compiler_3.6.0 tools_3.6.0 digest_0.6.25 jsonlite_1.7.0 lifecycle_0.2.0
[8] tibble_3.0.1 gtable_0.3.0 lattice_0.20-38 pkgconfig_2.0.3 rlang_0.4.6 Matrix_1.2-17 rstudioapi_0.11
[15] parallel_3.6.0 generics_0.0.2 vctrs_0.3.1 grid_3.6.0 tidyselect_1.1.0 reticulate_1.16 glue_1.4.1
[22] R6_2.4.1 polyclip_1.10-0 ggplot2_3.3.2 purrr_0.3.4 tidyr_1.1.0 farver_2.0.3 tweenr_1.0.1
[29] deldir_0.1-25 magrittr_1.5 matrixStats_0.56.0 scales_1.1.1 ellipsis_0.3.1 MASS_7.3-51.1 ggforce_0.3.2
[36] colorspace_1.4-1 labeling_0.3 stringi_1.4.6 munsell_0.5.0 crayon_1.3.4

Best, Sascha

RubD commented 4 years ago

Hi Sascha,

Thanks for letting us know and I'm sorry for the inconvenience. This is probably because we now use a sparse (vs dense) matrix to store the expression data, but forgot to test if spatialDE accepts that format. I'll try to test it later today and let you know when it's fixed.

Best, Ruben

RubD commented 4 years ago

The issue should be resolved now. I have:

If you use the automatic way (r-miniconda) to install the python modules you can use this snippet to install the necessary python modules for spatialDE:

`packages_to_install = c('NaiveDE', 'SpatialDE', 'patsy') conda_path = reticulate::miniconda_path() conda_full_path = paste0(conda_path,'/','bin/conda') full_envname = paste0(conda_path,'/envs/giotto_env')

reticulate::py_install(packages = packages_to_install, envname = full_envname, method = 'conda', conda = conda_full_path, pip = TRUE, python_version = '3.6')`

strauss-s commented 4 years ago

Hi Ruben,

thanks a lot for fixing it so quickly.

Best, Sascha