diff --git a/README.md b/README.md index d465c1dc..de33449d 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,11 @@ SpatialData is a data framework that comprises a FAIR storage format and a colle - [spatialdata-io](https://github.com/scverse/spatialdata-io): load data from common spatial omics technologies into spatialdata. - [spatialdata-plot](https://github.com/scverse/spatialdata-plot): Static plotting library for spatialdata. -- [napari-spatialdata](https://github.com/scverse/napari-spatialdata): napari plugin for interactive exploration and annotation of spatialdata. +- [napari-spatialdata](https://github.com/scverse/napari-spatialdata): napari plugin for interactive exploration and annotation of spatial data. ![SpatialDataOverview](https://github.com/scverse/spatialdata/assets/1120672/cb91071f-12a7-4b8e-9430-2b3a0f65e52f) - **The library is currently under review.** We expect there to be changes as the community provides feedback. -- To get involved in the discussion, or if you need help to get started, you are welcome to join our [`scverse` Zulip chat](https://imagesc.zulipchat.com/#narrow/stream/329057-scverse/topic/segmentation) and our [scverse discourse forum](https://discourse.scverse.org/). - The SpatialData storage format is built on top of the [OME-NGFF](https://ngff.openmicroscopy.org/latest/) specification. ## Getting started @@ -27,6 +26,8 @@ Please refer to the [documentation][link-docs]. In particular: - [Design doc][link-design-doc]. - [Example notebooks][link-notebooks]. +Another useful resource to get started is the source code of the [`spatialdata-io`](https://github.com/scverse/spatialdata-io) package, which shows example of how to read data from common technologies. + ## Installation Check out the docs for more complete [installation instructions](https://spatialdata.scverse.org/en/latest/installation.html). To get started with the "batteries included" installation, you can install via pip: @@ -35,10 +36,12 @@ Check out the docs for more complete [installation instructions](https://spatial pip install "spatialdata[extra]" ``` +Note: if you are using a Mac with an M1/M2 chip, please follow the installation instructions. + ## Contact -For questions and help requests, you can reach out in the [scverse discourse][scverse-discourse]. -If you found a bug, please use the [issue tracker][issue-tracker]. +- To get involved in the discussion, or if you need help to get started, you are welcome to join our [`scverse` Zulip chat](https://imagesc.zulipchat.com/#narrow/stream/329057-scverse/topic/segmentation) and our [scverse discourse forum](https://discourse.scverse.org/). + If you found a bug, please use the [issue tracker][issue-tracker]. ## Citation diff --git a/docs/index.md b/docs/index.md index f97708b8..507a530b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,9 +8,9 @@ SpatialData is a data framework that comprises a FAIR storage format and a collection of python libraries for performant access, alignment, and processing of uni- and multi-modal spatial omics datasets. This page provides documentation on how to install, use, and extend the core `spatialdata` library. See the links below to learn more about other packages in the SpatialData ecosystem. -- [spatialdata-io][]: load data from common spatial omics technologies into `spatialdata`. -- [spatialdata-plot][]: Static plotting library for `spatialdata`. -- [napari-spatialdata][]: napari plugin for interactive exploration and annotation of `spatialdata`. +- `spatialdata-io`: load data from common spatial omics technologies into `spatialdata` ([repository][spatialdata-io-repo], [documentation][spatialdata-io-docs]). +- `spatialdata-plot`: Static plotting library for `spatialdata` ([repository][spatialdata-plot-repo], [documentation][spatialdata-io-docs]). +- `napari-spatialdata-repo`: napari plugin for interactive exploration and annotation of `spatialdata` ([repository][napari-spatialdata-repo], [documentation][napari-spatialdata-docs]). Please see our preprint {cite}`Marconato2023.05.05.539647` for citation and to learn more. @@ -74,6 +74,9 @@ references.md -[napari-spatialdata]: https://github.com/scverse/napari-spatialdata -[spatialdata-io]: https://github.com/scverse/spatialdata-io -[spatialdata-plot]: https://github.com/scverse/spatialdata-plot +[napari-spatialdata-repo]: https://github.com/scverse/napari-spatialdata +[spatialdata-io-repo]: https://github.com/scverse/spatialdata-io +[spatialdata-plot-repo]: https://github.com/scverse/spatialdata-plot +[napari-spatialdata-docs]: https://spatialdata.scverse.org/projects/napari/en/latest/notebooks/spatialdata.html +[spatialdata-io-docs]: https://spatialdata.scverse.org/projects/io/en/latest/ +[spatialdata-plot-docs]: https://spatialdata.scverse.org/projects/plot/en/latest/index.html diff --git a/docs/installation.md b/docs/installation.md index d80c4927..480a7362 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -26,12 +26,30 @@ pip install "spatialdata[extra]" ## Additional dependencies -To use the dataloader in `spatialdata`, torch needs to be installed. This can be done with: +To use the `PyTorch` dataloader in `spatialdata`, `torch` needs to be installed. This can be done with: ```bash pip install "spatialdata[torch]" ``` +## Installation on a M1/M2 (Apple Silicon) Mac + +The framework supports the Apple Silicon architecture, but `napari-spatialdata` cannot be installed with `pip`, because `PyQt5` leads to an installation error. + +Thus `pip install "spatialdata[extra]"` will not work (as it installs `napari-spatialdata`). + +The solution is to pre-install `napari` via `conda` (which will install `PyQt5` correctly), and then install `napari-spatialdata` without the option `[extra]`. + +This is what is done in the following commands, which perform a correct installation on a M1/M2 Mac. + +```bash +mamba create -n my_env python==3.10 -y +conda activate my_env + +mamba install -c conda-forge napari -y +pip install spatialdata spatialdata-io spatialdata-plot napari-spatialdata +``` + ## Development version To install `spatialdata` from GitHub, run: @@ -40,15 +58,25 @@ To install `spatialdata` from GitHub, run: pip install git+https://github.com/scverse/spatialdata ``` -Alternative you can clone the repository and do an editable install with: +Alternative you can clone the repository (or a fork of it if you are contributing) and do an editable install with: ```bash pip install -e . ``` -This is the reccommended way to install the package in case in which you want to contribute to the code. To update the package you can use `git pull`. +This is the reccommended way to install the package in case in which you want to contribute to the code. In this case, to subsequently update the package you can use `git pull`. + +### A note on editable install + +If you perform an editable install of `spatialdata` and then install `spatialdata-plot`, `spatialdata-io` or `napari-spatialdata`, they may automatically override the installation of `spatialdata` with the version from PyPI. + +To check if this happened you can run + +``` +python -c "import spatialdata; print(spatialdata.__path__)" +``` -Important: if you perform an editable install of `spatialdata` and then install `spatialdata-plot`, `spatialdata-io` or `napari-spatialdata`, they may automatically override the installation of `spatialdata` with the version from PyPI. To check if this happened you can run `python -c "import spatialdata; print(spatialdata.__path__)"`: if you get a path that contains `site-packages`, then your editable installation has been overridden and you need to reinstall the package by rerunning `pip install -e .` in the cloned `spatialdata` repo. +if you get a path that contains `site-packages`, then your editable installation has been overridden and you need to reinstall the package by rerunning `pip install -e .` in the cloned `spatialdata` repo.