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

Refactor of organoid linking over multiplexing rounds #72

Merged
merged 4 commits into from
May 31, 2023
Merged

Conversation

nrepina
Copy link
Collaborator

@nrepina nrepina commented May 31, 2023

Create separate functions for registering and linking organoid label map images to share same processing code between Fractal and the Prefect implementation of scMultipleX.

nrepina added 3 commits May 31, 2023 15:28
…plying shift to images.

Create OrganoidLinkingFunctions.py and add functions for binning, shifting with phase cross correlation, and applying shift to images.
@nrepina nrepina requested review from jluethi and removed request for jluethi May 31, 2023 14:46
@nrepina
Copy link
Collaborator Author

nrepina commented May 31, 2023

@jluethi Please take a look at this refactor for organoid linking across multiplexing rounds and let us know what you think and if we missed anything. From our side this refactor is ready to merge, but if there are any further changes from the Fractal side we are happy to add changes with another PR.

The functions that perform registration and linking are now in the new OrganoidLinkingFunctions.py, and these would be the functions useful for the Fractal implementation. I've added descriptions of the functions and parameters, please let me know if there's anything unclear. The calculate_shift, apply_shift, and calculate_matching functions are then called in OrganoidLinking.py to process pairs of well overview images. This file is now primarily dealing with input/output that is specific to FAIM-HCS/Prefect.

A few small notes:

  • The apply_shift function can be used for intensity images, not only label images, so the calculated shifts can be applied to the MIP overviews for visualization.
  • I found that using a bin = 4 is a good value for subsampling
  • I typically use iou_cutoff = 0.6

Thanks, looking forward to your feedback!

@nrepina nrepina linked an issue May 31, 2023 that may be closed by this pull request
@nrepina nrepina merged commit 1c33570 into main May 31, 2023
@jluethi
Copy link
Contributor

jluethi commented Jun 2, 2023

@nrepina Looks great & very informative docstrings! Will work on a Fractal wrapper task for it next week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor organoid linking
2 participants