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

quantification: loop through multiple masks #121

Closed
clarenceyapp opened this issue May 1, 2020 · 11 comments · Fixed by #147
Closed

quantification: loop through multiple masks #121

clarenceyapp opened this issue May 1, 2020 · 11 comments · Fixed by #147
Labels
quantification Issues related to the quantification module

Comments

@clarenceyapp
Copy link
Collaborator

@DenisSch can there be a feature to accept multiple masks (ie. nucleiMask and cytoMask) and loop through the quantification? Sort of like the MeasureObjectIntensity module in Cellprofiler.

@ArtemSokolov
Copy link
Collaborator

We can loop through the masks in nextflow. This way they will be all processed in parallel. We just need to ensure that quantification accounts for it in the output filename, to avoid name collisions.

@clarenceyapp
Copy link
Collaborator Author

Following from some discussions with @ArtemSokolov and to give some context, Cellprofiler outputs a csv file for each mask (ie. nuclei, cytoplasm, or cell). The csv filenames can be appended with 'nuclei' and 'cytoplasm' in the same way that Cellprofiler does it to avoid collision and so that experimentalists know which region they're looking at. These regions can be inferred straight from the mask file names which are nucleiMask, cytoplasmMask, cellMask, etc. (or even eliminate 'Mask' for brevity).

@ArtemSokolov ArtemSokolov added the quantification Issues related to the quantification module label May 19, 2020
@ArtemSokolov
Copy link
Collaborator

This needs to "play nicely" with the naming scheme being discussed in #97 .

@DenisSch
Copy link
Collaborator

This was now address with this new release:
https://github.com/labsyspharm/quantification/releases/tag/1.3.1

@ArtemSokolov
Copy link
Collaborator

@DenisSch What do you want the default mcmicro behavior to be? Pass all masks from s3seg?

Is this the correct usage?
python CommandSingleCellExtraction.py --masks ./segmentation/cellMask.tif ./segmentation/membraneMask.tif ...
(i.e., all mask files are passed to --masks a space-separated filenames).

@DenisSch
Copy link
Collaborator

@ArtemSokolov
The first mask will be used for spatial features extraction (in your example cellMask.tif) and all additional masks will be only quantified without spatial information.
I would suggest to keep cellMask.tif default and if the user wants to add more masks they can be added as another parameter via mask name - something like

--mask_spatial cellMask.tif --> which is default but can be changed
--mask_add nucleiMask.tif cytoMask.tif --> which can be added by the user

@ArtemSokolov
Copy link
Collaborator

To clarify, --mask_spatial and --mask_add are quantification parameters? or suggested mcmicro parameters?

@DenisSch
Copy link
Collaborator

Suggested mcmicro parameters. The quantification parameters did not change besides that we can add now more than one mask

@ArtemSokolov
Copy link
Collaborator

OK, this will require a little bit of work, since mcmicro needs to match up what s3seg writes out to what the user requests in --mask_*, and then to put the files in the correct order.

@DenisSch
Copy link
Collaborator

@ArtemSokolov Please let me know if I can help (or should try to implement it myself) or whether a change in the quantification module would be helpful.

@DenisSch
Copy link
Collaborator

DenisSch commented Jun 16, 2020

It will also play well #97 - if we specify mask location via method and mask name

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

Successfully merging a pull request may close this issue.

3 participants