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

Pixel-wise decoding for Polaris #73

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Pixel-wise decoding for Polaris #73

merged 2 commits into from
Aug 24, 2023

Conversation

elaubsch
Copy link
Member

@elaubsch elaubsch commented Aug 22, 2023

This PR introduces an algorithmic change to Polaris that increases the number of pixels sent through the SpotDecoding application. Previously, we performed peak finding to determine which pixels were decoded. Now with this change, we will threshold the spot probability image and decode all pixels above a certain spot probability. Then, we create a mask for all of the pixels decoded to genes and apply this mask to the spot probability image. We then perform peak finding on this masked image to call the gene locations. This change is like a compromise between Polaris' original method and pixel-wise decoding methods that are common in MERFISH analysis pipelines. We found that this method increases the number of spots decoded to genes by Polaris, while yielding results with a better correlation to bulk sequencing data.

This change redefines of the threshold parameter for the predict method. Instead of being used in peak finding, this parameter is used to create a mask for tissue area. Therefore, the default value has been changed.

This PR also includes changes the output of Polaris that are unrelated to the algorithmic change. Polaris previously returned df_spots and df_intensities, but now these two outputs have been concatenated column-wise to yield a single DataFrame.

@elaubsch elaubsch added the enhancement New feature or request label Aug 22, 2023
@elaubsch elaubsch merged commit c3a01d8 into master Aug 24, 2023
5 checks passed
@elaubsch elaubsch deleted the mly/pixel-wise branch August 24, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant