diff --git a/starfish/core/spots/DetectPixels/combine_adjacent_features.py b/starfish/core/spots/DetectPixels/combine_adjacent_features.py index 7057fb100..6bd4f528b 100644 --- a/starfish/core/spots/DetectPixels/combine_adjacent_features.py +++ b/starfish/core/spots/DetectPixels/combine_adjacent_features.py @@ -342,6 +342,7 @@ def _create_spot_attributes( passes_filter = np.array(passes_area_filter, dtype=np.bool) spot_attributes = SpotAttributes(pd.DataFrame.from_records(spot_attrs)) + spot_attributes.data[Features.SPOT_ID] = np.arange(0, len(spot_attributes.data)) return spot_attributes, passes_filter def run( diff --git a/starfish/test/full_pipelines/api/test_merfish.py b/starfish/test/full_pipelines/api/test_merfish.py index f268a8f6f..a0c866af3 100644 --- a/starfish/test/full_pipelines/api/test_merfish.py +++ b/starfish/test/full_pipelines/api/test_merfish.py @@ -215,6 +215,9 @@ def test_merfish_pipeline_cropped_data(): spot_intensities = merfish.initial_spot_intensities + # check that intensities were giving spot ids using PixelSpotDecoding + assert "spot_id" in spot_intensities.coords + # verify that the number of spots are correct spots_passing_filters = spot_intensities[Features.PASSES_THRESHOLDS].sum() assert spots_passing_filters == 1410