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

Manual mask names #1126

Merged
merged 13 commits into from
Apr 9, 2024
Merged

Manual mask names #1126

merged 13 commits into from
Apr 9, 2024

Conversation

camisowers
Copy link
Contributor

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?

Closes #1125.

  1. Prevents duplicate names from causing issues while generating the cell table.
  2. Theres currently also a bug in the nuclear expression logic.
    Currently if nuclear_counts=True, the nuclear counts are calculated in a loop for each mask (large/unnecessary computation burden for many ezseg masks).
    The cell table creates it's own set of rows for the nuclear masks according to the ezseg logic, while also having a second set of columns suffixed with _nuclear using traditional cell table logic. We want to remove the duplicated nuclear expression values, as well as saving the computational effort.

How did you implement your changes

  1. Adds mask_types as an optional argument to generate_cell_table() detailing which masks to extract expression data for; the default is set to ['whole_cell'].
  2. Ensure nuclear counts are only done once, when the whole cell masks are being processed.

Remaining issues

Add manual mask name specification into the ez segmenter notebook. @bryjcannon

@camisowers camisowers added the bug Something isn't working label Mar 12, 2024
@camisowers camisowers self-assigned this Mar 12, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Contributor

@srivarra srivarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!!

@bryjcannon
Copy link
Contributor

Code looks good with, just need to update the example_dataset and can then merge with main.

@srivarra
Copy link
Contributor

srivarra commented Apr 9, 2024

@camisowers Dataset is updated, this is good to go.

@camisowers camisowers added this pull request to the merge queue Apr 9, 2024
Merged via the queue into main with commit a3c08d6 Apr 9, 2024
18 checks passed
@camisowers camisowers deleted the manual_mask_names branch April 9, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate FOV name issues with cell table generation
3 participants