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

[easy] adding spot ids to pixel results #1687

Merged
merged 1 commit into from
Dec 6, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions starfish/test/full_pipelines/api/test_merfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down