Skip to content
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

Add min_distance parameter to peak_local_max call #2008

Merged
merged 3 commits into from
Dec 1, 2023
Merged
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
3 changes: 2 additions & 1 deletion REQUIREMENTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ scipy
showit >= 1.1.4
slicedimage==4.1.1
sympy ~= 1.5.0
urllib3 <1.27, >=1.25.4
tqdm
trackpy
validators
xarray >= 0.14.1
ipywidgets
ipywidgets
1 change: 1 addition & 0 deletions starfish/core/morphology/Filter/min_distance_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def run(
exclude_border=self._exclude_border,
footprint=footprint,
labels=np.asarray(mask),
min_distance=self._minimum_distance_xy,
)
local_maximum_mask = np.zeros_like(distance, dtype=bool)
local_maximum_mask[tuple(local_maximum.T)] = True
Expand Down
6 changes: 3 additions & 3 deletions starfish/test/full_pipelines/api/test_iss_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def test_iss_pipeline_cropped_data(tmpdir):

masks = iss.masks

# segmentation identifies only one cell
assert len(iss.watershed_markers) == 6
# segmentation identifies four cells
assert len(iss.watershed_markers) == 4

# assign targets
lab = AssignTargets.Label()
Expand Down Expand Up @@ -143,4 +143,4 @@ def test_iss_pipeline_cropped_data(tmpdir):
# test that nans were properly removed from the expression matrix
assert 'nan' not in expression_matrix.genes.data
# test the number of spots that did not decode per cell
assert np.array_equal(expression_matrix.number_of_undecoded_spots.data, [13, 1, 0, 36])
assert np.array_equal(expression_matrix.number_of_undecoded_spots.data, [13, 1, 36])
Loading