Skip to content

Commit

Permalink
SC_39 fix docs (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneDefauw authored Dec 9, 2024
1 parent 8f1a094 commit 1aa88d8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ packages = find:
install_requires =
spatialdata>=0.2.0
ome-zarr>=0.9.0
squidpy>=1.5.0
scanpy>=1.9.1
voronoi-diagram-for-polygons>=0.1.6
rasterio>=1.3.2
Expand Down Expand Up @@ -70,14 +69,15 @@ plugin =
hydra-core>=1.2.0
hydra-colorlog>=1.2.0
napari-spatialdata>=0.2.6

squidpy>=1.5.0
cellpose>=2.2.3
pytest-qt

testing =
hydra-core>=1.2.0
hydra-colorlog>=1.2.0
cellpose>=2.2.3
squidpy>=1.5.0
datasets
jax>=0.4.6
jaxlib>=0.4.6
Expand Down Expand Up @@ -108,7 +108,7 @@ docs =

clustering =
scikit-learn>=1.3.1
flowsom
#flowsom @ git+https://[email protected]/saeyslab/FlowSOM_Python # wait for release. Pypi does not support git+ dependencies
datasets
textalloc
joypy
Expand Down
6 changes: 5 additions & 1 deletion src/harpy/image/_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import dask.array as da
import numpy as np
import squidpy as sq
from spatialdata import SpatialData
from spatialdata.models.models import ScaleFactors_t
from spatialdata.transformations import Translation, get_transformation
Expand Down Expand Up @@ -30,6 +29,11 @@
except ImportError:
log.warning("'OpenCV (cv2)' not installed, to use 'harpy.im.tiling_correction' please install this library.")

try:
import squidpy as sq
except ImportError:
log.warning("'squidpy' not installed, to use 'harpy.im.tiling_correction' please install this library.")


def tiling_correction(
sdata: SpatialData,
Expand Down
4 changes: 3 additions & 1 deletion src/harpy/image/pixel_clustering/_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

from harpy.utils._flowsom import _flowsom
except ImportError:
log.warning("'flowsom' not installed, to use 'harpy.im.flowsom', please install this library.")
log.warning(
"'flowsom' not installed, to use 'harpy.im.flowsom', please install this library (https://[email protected]/saeyslab/FlowSOM_Python)."
)


def flowsom(
Expand Down
9 changes: 8 additions & 1 deletion src/harpy/plot/_enrichment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@

import matplotlib.pyplot as plt
import numpy as np
import squidpy as sq
from spatialdata import SpatialData

from harpy.utils._keys import _ANNOTATION_KEY
from harpy.utils.pylogger import get_pylogger

log = get_pylogger(__name__)

try:
import squidpy as sq
except ImportError:
log.warning("'squidpy' not installed, to use 'harpy.pl.nhood_enrichment' please install this library.")


def nhood_enrichment(
Expand Down
9 changes: 8 additions & 1 deletion src/harpy/table/_enrichment.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import squidpy as sq
from spatialdata import SpatialData

from harpy.table._table import ProcessTable, add_table_layer
from harpy.utils._keys import _ANNOTATION_KEY
from harpy.utils.pylogger import get_pylogger

log = get_pylogger(__name__)

try:
import squidpy as sq
except ImportError:
log.warning("'squidpy' not installed, to use 'harpy.tb.nhood_enrichment' please install this library.")


def nhood_enrichment(
Expand Down
4 changes: 3 additions & 1 deletion src/harpy/table/cell_clustering/_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
from harpy.utils._flowsom import _flowsom

except ImportError:
log.warning("'flowsom' not installed, to use 'harpy.tb.flowsom', please install this library.")
log.warning(
"'flowsom' not installed, to use 'harpy.tb.flowsom', please install this library (https://[email protected]/saeyslab/FlowSOM_Python)."
)


def flowsom(
Expand Down

0 comments on commit 1aa88d8

Please sign in to comment.