I seem to be having a problem downloading the R package spatialLIBD
. The problem seems to occur with the magick
dependency... I don't have root access so cannot install Magick++
. I am only interested in getting the datasets, not using the visualization functions.... is there a work around to installing spatialLIBD
without having to this dependency?
# include your problematic code here with any corresponding output
BiocManager::install("spatialLIBD")
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details
replacement repositories:
CRAN: https://cloud.r-project.org
Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Installing package(s) 'spatialLIBD'
also installing the dependencies ‘SpatialExperiment’, ‘magick’
trying URL 'https://bioconductor.org/packages/3.15/bioc/src/contrib/SpatialExperiment_1.6.0.tar.gz'
Content type 'application/x-gzip' length 5389608 bytes (5.1 MB)
==================================================
downloaded 5.1 MB
trying URL 'https://cloud.r-project.org/src/contrib/magick_2.7.3.tar.gz'
Content type 'application/x-gzip' length 4813163 bytes (4.6 MB)
==================================================
downloaded 4.6 MB
trying URL 'https://bioconductor.org/packages/3.15/data/experiment/src/contrib/spatialLIBD_1.8.10.tar.gz'
Content type 'application/x-gzip' length 7293576 bytes (7.0 MB)
==================================================
downloaded 7.0 MB
* installing *source* package ‘magick’ ...
** package ‘magick’ successfully unpacked and MD5 sums checked
** using staged installation
Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Magick++' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the Magick++ library. Try installing:
- deb: libmagick++-dev (Debian, Ubuntu)
- rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL)
- csw: imagemagick_dev (Solaris)
- brew imagemagick@6 (MacOS)
For Ubuntu versions Trusty (14.04) and Xenial (16.04) use our PPA:
sudo add-apt-repository -y ppa:cran/imagemagick
sudo apt-get update
sudo apt-get install -y libmagick++-dev
If Magick++ is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: Magick++.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘magick’
* removing ‘/projects/kster/.conda/envs/r-spalibd/magick’
ERROR: dependency ‘magick’ is not available for package ‘SpatialExperiment’
* removing ‘/projects/kster/.conda/envs/r-spalibd/SpatialExperiment’
ERROR: dependencies ‘SpatialExperiment’, ‘magick’ are not available for package ‘spatialLIBD’
* removing ‘/projects/kster/.conda/envs/r-spalibd/spatialLIBD’
The downloaded source packages are in
‘/tmp/Rtmppkx2z0/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
MASS, nlme, spatial, survival
Warning messages:
1: In install.packages(...) :
installation of package ‘magick’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘SpatialExperiment’ had non-zero exit status
3: In install.packages(...) :
installation of package ‘spatialLIBD’ had non-zero exit status
# please also include the results of running the following in an R session
sessionInfo( )
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager_1.30.18 compiler_4.2.1 tools_4.2.1
I've also tried with conda install -c bioconda bioconductor-spatiallibd
(in a completely new virtual env) but end up with the following error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError:
I guess it depends on what you mean by only getting the datasets? You can clone the package with
git clone https://git.bioconductor.org/packages/spatialLIBD
and have access to raw files that were provided with the package. And the vignette forUsing spatialLIBD with 10x Genomics public datasets
takes through how to download and process data with the accompanied packages before using spatialLIBD. And some of the data is hosted in experiment hub as described inIntroduction to spatialLIBD
. There is also a spatialLIBD data set from the STexampleData hosted in experimenthub.All the solutions Lori proposed are valid. The
STexampleData
package I think has only 1 of our samples (see https://bioconductor.org/packages/release/data/experiment/vignettes/STexampleData/inst/doc/STexampleData_overview.html#visium_humandlpfc), but in any case, feel free to check it out at https://bioconductor.org/packages/STexampleData/.Lukas M Weber, a co-author of our work and also one of the lead authors of
SpatialExperiment
, is the maintainer ofSTexampleData
if you just need some SPE objects. If you need all 12 of our samples, check my answer. If you want to build SPE objects from thespaceranger
output files by 10x Genomics, check thespatialLIBD
vignette Lori linked you to.