Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,16 @@ conda install -c conda-forge squidpy

### Interactive visualization

To get optional dependencies required for the napari-based interactive plotting APIs, install the `interactive` extra:

```console
pip install 'squidpy[interactive]'
```
For interactive visualization with napari, please use [napari-spatialdata](https://github.com/scverse/napari-spatialdata).
The original napari plugin from Squidpy has been deprecated and replaced by napari-spatialdata, which offers
improved functionality and support for the SpatialData ecosystem.

## Key capabilities

- Build and analyze spatial neighbor graphs directly from Visium, Slide-seq, Xenium, and other spatial omics assays.
- Compute spatial statistics for cell types and genes, including neighborhood enrichment, co-occurrence, and Moran's I.
- Efficiently store, featurize, and visualize high-resolution tissue microscopy images via [scikit-image](https://scikit-image.org/).
- Explore annotated datasets interactively with [napari](https://napari.org/) and scverse visualization tooling.
- Explore annotated datasets interactively with [napari-spatialdata](https://github.com/scverse/napari-spatialdata).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please see our manuscript [Palla, Spitzer et al. (2022)](https://doi.org/10.1038
- Build and analyze the neighborhood graph from spatial coordinates
- Compute spatial statistics for cell-types and genes
- Efficiently store, analyze and visualize large tissue images, leveraging [scikit-image](https://scikit-image.org/)
- Interactively explore [anndata](https://anndata.readthedocs.io/en/stable/) and large tissue images in [napari](https://napari.org/)
- Interactively explore spatial data with [napari-spatialdata](https://github.com/scverse/napari-spatialdata)

## Getting started with Squidpy

Expand Down
14 changes: 10 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ Install Squidpy by running::

pip install squidpy

Alternatively, to include all dependencies, such as the interactive image viewer {mod}`napari`, run::

pip install 'squidpy[interactive]'

## Conda

Install Squidpy via Conda as::
Expand All @@ -23,3 +19,13 @@ Install Squidpy via Conda as::
To install Squidpy from GitHub, run::

pip install git+https://github.com/scverse/squidpy@main

## Interactive visualization

For interactive visualization with napari, please use [napari-spatialdata](https://github.com/scverse/napari-spatialdata).
The original napari plugin from Squidpy has been deprecated and replaced by napari-spatialdata,
which offers improved functionality and support for the SpatialData ecosystem.

Install napari-spatialdata with::

pip install napari-spatialdata
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ lint.per-file-ignores.".scripts/ci/download_data.py" = [ "B", "D" ]
lint.per-file-ignores."docs/*" = [ "B", "D" ]
lint.per-file-ignores."src/squidpy/_constants/_constants.py" = [ "D101" ]
lint.per-file-ignores."src/squidpy/_constants/_pkg_constants.py" = [ "D101", "D102", "D106" ]
lint.per-file-ignores."src/squidpy/pl/_interactive/_widgets.py" = [ "D" ]
lint.per-file-ignores."src/squidpy/pl/_interactive/interactive.py" = [ "E", "F" ]
lint.per-file-ignores."src/squidpy/pl/_ligrec.py" = [ "B", "D" ]
lint.per-file-ignores."tests/*" = [ "D" ]
lint.unfixable = [
Expand All @@ -244,7 +242,6 @@ python_files = "test_*.py"
testpaths = [ "tests/" ]
xfail_strict = true
addopts = [
"--ignore=tests/plotting/test_interactive.py",
"--ignore=docs",
]

Expand All @@ -255,7 +252,6 @@ source = [ "squidpy" ]
omit = [
"*/__init__.py",
"*/_version.py",
"squidpy/pl/_interactive/*",
"tox/*",
]

Expand Down
3 changes: 1 addition & 2 deletions src/squidpy/im/_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from itertools import chain
from pathlib import Path
from types import MappingProxyType
from typing import TYPE_CHECKING, Any, Literal, TypeAlias, TypeVar
from typing import TYPE_CHECKING, Any, Literal, TypeAlias

import dask.array as da
import matplotlib as mpl
Expand Down Expand Up @@ -51,7 +51,6 @@
Arraylike_t: TypeAlias = NDArrayA | xr.DataArray
InferDims_t: TypeAlias = Literal["default", "prefer_channels", "prefer_z"] | Sequence[str]
Input_t: TypeAlias = Pathlike_t | Arraylike_t | Literal["ImageContainer"]
Interactive = TypeVar("Interactive") # cannot import because of cyclic dependencies
_ERROR_NOTIMPLEMENTED_LIBID = f"It seems there are multiple `library_id` in `adata.uns[{Key.uns.spatial!r}]`.\n \
Loading multiple images is not implemented (yet), please specify a `library_id`."

Expand Down
2 changes: 0 additions & 2 deletions src/squidpy/pl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
nhood_enrichment,
ripley,
)

# from squidpy.pl._interactive import Interactive # type: ignore[attr-defined] # deprecated
from squidpy.pl._ligrec import ligrec
from squidpy.pl._spatial import spatial_scatter, spatial_segment
from squidpy.pl._utils import extract
Expand Down
12 changes: 11 additions & 1 deletion src/squidpy/pl/_interactive/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""Deprecated napari interactive visualization module.

This module has been deprecated in favor of napari-spatialdata.
Please see https://github.com/scverse/napari-spatialdata for the replacement.
"""

from __future__ import annotations

# from squidpy.pl._interactive.interactive import Interactive
raise ImportError(
"The squidpy napari plugin has been deprecated and removed. "
"Please use napari-spatialdata instead: "
"https://github.com/scverse/napari-spatialdata"
)
Loading