Closed camisowers closed 11 months ago
@cliu72 Can you take a look at this and let me know if you want anything tweaked? Also would the names of any generated prefixed masks be prefix_fov1_pixel_mask.tiff or fov1_prefix_pixel_mask.tiff ?
This looks good to me! Sorry to throw off the timeline with my late response. I don't have strong opinions, but I think I slightly like the second option for the generic notebook better ("2. Also store the output in the top level mantis directory, since that’s the only mask that will be generated."), just so there's like consistently always a top-level mantis directory. Maybe if people want to compare pixie cell clustering with lorenz's method, it would be helpful to have them in the top-level directory.
Also don't have strong opinions about the location of the prefix - maybe prefix_fov1_pixel_mask.tiff? Not for any real reason, I just think it looks better lol
This is for internal use only; if you'd like to open an issue or request a new feature, please open a bug or enhancement issue
Instructions
This document should be filled out prior to embarking on any project that will take more than a couple hours to complete. The goal is to make sure that everyone is on the same page for the functionality and requirements of new features. Therefore, it's important that this is detailed enough to catch any misunderstandings beforehand. For larger projects, it can be useful to first give a high-level sketch, and then go back and fill in the details. For smaller ones, filling the entire thing out at once can be sufficient.
Relevant background
Addresses #669.
Currently, the pixie notebooks create separate Mantis directories for 2_pixel, 3_cell clustering, 4_post clustering, and generic clustering. This entails copying over all of the channel images and the segmentation mask for each FOV; it would be better to have a single mantis directory for sequential notebooks, rather than having duplicates of the data.
For the prefix capable that I spoke with @cliu72 about, we can add a
mask_prefix
arg that defaults to None, so that any advanced users generating multiple pixel/cell masks can load those into the mantis directory. If the masks are named prefix_fov1_pixel_mask.tiff you can just specify the prefix and it will copy those over.Also add "mantis_" to all the copied masks, to find them easier in the mantis viewer.
Design overview Current directory structure: (the masks are actually stored in fov subdirs in the mantis folder)
I think it would make more sense to have a higher level mantis directory that stores a copy of the segmentation masks, channel images, and then adds any masks that get generated.
We have two options with the generic cell notebook output:
Code mockup
The
create_mantis_dir()
function will need to be tweaked so that segmentation masks are not always copied over. The function already has a check to make sure channel images are no recopied, but this is not utilized since each notebook has it's own directory.For the post_clusering output, we'll just need to change the name of the mask that's outputted from cell_mask.tiff to post_clustering_cell_mask.tiff.
create_mantis_dir()
is called bycreate_mantis_project()
in notebook 4, we can add a new arg to that function to specify the name of the mask to re-generate.Required inputs
Channel images, segmentation masks, and output masks from whichever notebook is being run.
Output files
A single mantis directory that contains descriptive names for any masks added by the notebooks.
Timeline Give a rough estimate for how long you think the project will take. In general, it's better to be too conservative rather than too optimistic.
Estimated date when a fully implemented version will be ready for review: Monday 9/11
Estimated date when the finalized project will be merged in: Wednesday 9/13