-
Notifications
You must be signed in to change notification settings - Fork 58
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:mcquant error after segmentation with Mesmer #475
Comments
Hi @nancyliy, The following error indicates that the input image and the label mask have different dimensions:
What is the width & height of |
@ArtemSokolov Thanks for your suggestion. I would like to know how to get the dimensions of input run_quantifictation.txt There was no additional processing done to the images beyond MCMICRO pipeline. Thank you! |
There are a lot of different ways to determine image dimensions, depending on what's installed on your system.
import tifffile
tifffile.imread('exemplar-001/registration/exemplar-001.ome.tif').shape
# (12, 3139, 2511)
tifffile.imread('exemplar-001/segmentation/mesmer/exemplar-001.ome.tif').shape
# (3139, 2511) In the above example, we can see that the input image contains 12 channels, each channel being a 3139 x 2511 pixel image. Similarly, the segmentation mask is a single-channel 3139 x 2511 pixel image. |
Thanks @ArtemSokolov ! I used your advice I found out my mask has a dimension of (11520, 19392, 2) -- suggesting it has 2 compartments. Then instead of using |
I encountered the following error when running the MCMICRO pipeline at the quantification stage of the workflow:
Error executing process > 'quantification:mcquant (1)'
Caused by:
Process
quantification:mcquant (1)
terminated with an error exit status (1)Command executed:
python /app/CommandSingleCellExtraction.py --image pilot_2--mesmer.ome.tif --masks cell*.tif --output . --channel_names markers.csv
Command exit status:
1
Command output:
{'masks': ['cell.tif'], 'image': 'pilot_2--mesmer.ome.tif', 'channel_names': 'markers.csv', 'output': '.', 'intensity_props': {'intensity_mean'}, 'mask_props': None}
Extracting single-cell data for pilot_2--mesmer.ome.tif...
Command error:
WARNING: DEPRECATED USAGE: Environment variable SINGULARITYENV_TMPDIR will not be supported in the future, use APPTAINERENV_TMPDIR instead
INFO: underlay of /usr/bin/nvidia-smi required more than 50 (434) bind mounts
Traceback (most recent call last):
{'masks': ['cell.tif'], 'image': 'pilot_2--mesmer.ome.tif', 'channel_names': 'markers.csv', 'output': '.', 'intensity_props': {'intensity_mean'}, 'mask_props': None}
Extracting single-cell data for pilot_2--mesmer.ome.tif...
File "/app/CommandSingleCellExtraction.py", line 11, in
SingleCellDataExtraction.MultiExtractSingleCells(**args)
File "/app/SingleCellDataExtraction.py", line 263, in MultiExtractSingleCells
ExtractSingleCells(masks,image,channel_names,output, mask_props=mask_props, intensity_props=intensity_props)
File "/app/SingleCellDataExtraction.py", line 236, in ExtractSingleCells
scdata_z = MaskZstack(masks_loaded,image,channel_names_loaded_checked, mask_props=mask_props, intensity_props=intensity_props)
File "/app/SingleCellDataExtraction.py", line 145, in MaskZstack
MaskChannel(masks_loaded[mask_names[nm]],image_loaded_z, intensity_props=intensity_props)
File "/app/SingleCellDataExtraction.py", line 35, in MaskChannel
dat = measure.regionprops_table(
File "/home/users/nancyliy/.local/lib/python3.9/site-packages/skimage/measure/_regionprops.py", line 974, in regionprops_table
regions = regionprops(label_image, intensity_image=intensity_image,
File "/home/users/nancyliy/.local/lib/python3.9/site-packages/skimage/measure/_regionprops.py", line 1290, in regionprops
props = RegionProperties(sl, label, label_image, intensity_image,
File "/home/users/nancyliy/.local/lib/python3.9/site-packages/skimage/measure/_regionprops.py", line 288, in init
raise ValueError('Label and intensity image shapes must match,'
ValueError: Label and intensity image shapes must match, except for channel (last) axis.
The input registration image
pilot_2--mesmer.ome.tif
and the output maskcell*.tif
are too large to be shared here but I am happy to share those files via OneDrive if needed to examine the image shapes.Thank you!
Nextflow_Pilot2.txt
The text was updated successfully, but these errors were encountered: