-
Notifications
You must be signed in to change notification settings - Fork 100
Method to detect specimens in H&E images #1044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
timtreis
merged 22 commits into
main
from
feature/issue1042-function-to-automatically-generate-tissue-masks-in-he
Oct 27, 2025
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
dacc00c
mvp for function; without testgs
timtreis 34eab19
added option to retain holes
timtreis f806188
Merge branch 'main' into feature/issue1042-function-to-automatically-…
timtreis ec5fc41
refactor + 1 test
timtreis 6fd630e
added missing import
timtreis b3cdc9e
renamed test so that a plot would be generated
timtreis 97ad9e3
added img from runner; cross-os-data-cache
timtreis 7323df5
improved docstring
timtreis b5e621c
added data download script to correct location
timtreis 4b52a36
updated hatch commands
timtreis c5e0946
modified coverage combine
timtreis cb68a27
removed superflous combine step
timtreis 76b4065
first download data, then run tests
timtreis 8c3e62a
attempt to simplify
timtreis aa3a964
aligned testing
timtreis 9a879ec
updated toml
timtreis efd1eb7
aligned __init__ files
timtreis 1e8d6d0
no uv cache for data download
timtreis 5b9b4e0
removed download step that'd never get hit
timtreis d7ee04b
simplify
flying-sheep d6b6d18
parallel
flying-sheep 11fedf3
speed up tests
flying-sheep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,16 +37,20 @@ authors = [ | |
| {name = "Giovanni Palla"}, | ||
| {name = "Michal Klein"}, | ||
| {name = "Hannah Spitzer"}, | ||
| {name = "Tim Treis"}, | ||
| {name = "Laurens Lehner"}, | ||
| {name = "Selman Ozleyen"}, | ||
| ] | ||
| maintainers = [ | ||
| {name = "Giovanni Palla", email = "[email protected]"}, | ||
| {name = "Michal Klein", email = "[email protected]"}, | ||
| {name = "Tim Treis", email = "[email protected]"} | ||
| {name = "Tim Treis", email = "[email protected]"}, | ||
| {name = "Selman Ozleyen", email = "[email protected]"} | ||
| ] | ||
|
|
||
| dependencies = [ | ||
| "aiohttp>=3.8.1", | ||
| "anndata>=0.9", | ||
| "spatialdata>=0.2.5", | ||
| "spatialdata-plot", | ||
| "cycler>=0.11.0", | ||
| "dask-image>=0.5.0", | ||
| "dask[array]>=2021.02.0,<=2024.11.2", | ||
|
|
@@ -61,7 +65,7 @@ dependencies = [ | |
| "pandas>=2.1.0", | ||
| "Pillow>=8.0.0", | ||
| "scanpy>=1.9.3", | ||
| "scikit-image>=0.20", | ||
| "scikit-image>=0.25", | ||
| # due to https://github.com/scikit-image/scikit-image/issues/6850 breaks rescale ufunc | ||
| "scikit-learn>=0.24.0", | ||
| "statsmodels>=0.12.0", | ||
|
|
@@ -70,14 +74,20 @@ dependencies = [ | |
| "tqdm>=4.50.2", | ||
| "validators>=0.18.2", | ||
| "xarray>=2024.10.0", | ||
| "imagecodecs>=2025.8.2,<2026", | ||
| "zarr>=2.6.1", | ||
| "spatialdata>=0.2.5", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pre-commit>=3.0.0", | ||
| "hatch>=1.9.0", | ||
| "jupyterlab", | ||
| "notebook", | ||
| "ipykernel", | ||
| "ipywidgets", | ||
| "jupytext", | ||
| "ruff", | ||
| ] | ||
| test = [ | ||
| "scanpy[leiden]", | ||
|
|
@@ -262,6 +272,7 @@ omit = [ | |
| "*/__init__.py", | ||
| "*/_version.py", | ||
| "squidpy/pl/_interactive/*", | ||
| "tox/*", | ||
| ] | ||
|
|
||
| [tool.coverage.paths] | ||
|
|
@@ -282,3 +293,37 @@ show_missing = true | |
| precision = 2 | ||
| skip_empty = true | ||
| sort = "Miss" | ||
|
|
||
| [tool.pixi.workspace] | ||
| channels = ["conda-forge"] | ||
| platforms = ["osx-arm64", "linux-64"] | ||
|
|
||
| [tool.pixi.dependencies] | ||
| python = ">=3.11" | ||
|
|
||
| [tool.pixi.pypi-dependencies] | ||
| squidpy = { path = ".", editable = true } | ||
|
|
||
| [tool.pixi.feature.py311.dependencies] | ||
| python = "3.11.*" | ||
|
|
||
| [tool.pixi.feature.py313.dependencies] | ||
| python = "3.13.*" | ||
|
|
||
| [tool.pixi.environments] | ||
| dev-py311 = { features = ["dev", "test", "py311"], solve-group = "py311" } | ||
| docs-py311 = { features = ["docs", "py311"], solve-group = "py311" } | ||
|
|
||
| default = { features = ["py313"], solve-group = "py313" } | ||
| dev-py313 = { features = ["dev", "test", "py313"], solve-group = "py313" } | ||
| docs-py313 = { features = ["docs", "py313"], solve-group = "py313" } | ||
| test-py313 = { features = ["test", "py313"], solve-group = "py313" } | ||
|
|
||
| [tool.pixi.tasks] | ||
| lab = "jupyter lab" | ||
| kernel-install = "python -m ipykernel install --user --name pixi-dev --display-name \"squidpy (dev)\"" | ||
| test = "pytest -v --color=yes --tb=short --durations=10" | ||
| lint = "ruff check ." | ||
| format = "ruff format ." | ||
| pre-commit-install = "pre-commit install" | ||
| pre-commit = "pre-commit run" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timtreis marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| """Experimental module for Squidpy. | ||
|
|
||
| This module contains experimental features that are still under development. | ||
| These features may change or be removed in future releases. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from . import im | ||
| from .im._detect_tissue import detect_tissue | ||
|
|
||
| __all__ = ["detect_tissue", "im"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from ._detect_tissue import ( | ||
| BackgroundDetectionParams, | ||
| FelzenszwalbParams, | ||
| detect_tissue, | ||
| ) | ||
|
|
||
| __all__ = ["detect_tissue", "BackgroundDetectionParams", "FelzenszwalbParams"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.