BodenmillerGroup / ImcSegmentationPipeline

A pixel classification based multiplexed image segmentation pipeline
https://bodenmillergroup.github.io/ImcSegmentationPipeline/
MIT License
86 stars 36 forks source link

Error in generating the histocat folder with masks #19

Closed cassandraman closed 5 years ago

cassandraman commented 5 years ago

Dear Votti,

I'm having trouble with the step generating histocat folder with masks using the example data. The following error is returned.

NotADirectoryError Traceback (most recent call last)

in /anaconda3/envs/imctools/lib/python3.6/site-packages/imctools/scripts/ome2micat.py in omefolder2micatfolder(fol_ome, outfolder, fol_masks, mask_suffix, dtype) 58 mask_suffix = '_mask.tiff' 59 ---> 60 ome_files = [fn for fn in os.listdir(fol_ome) if fn.endswith('.ome.tiff')] 61 if fol_masks is not None: 62 fn_masks = [fn for fn in os.listdir(fol_masks) if fn.endswith(mask_suffix)] NotADirectoryError: [Errno 20] Not a directory: '../output/ometiff/.DS_Store' ------------------------- While files are created within the histocat folder in output, they all appear to be empty black images. I really appreciate your help!
votti commented 5 years ago

Hi cassandraman, The NotADirectoryError is a problem with temporary files that MacOS is generating sometimes - it can be temporary fixed by removing the '../output/ometiff/.DS_Store' file (e.g. doing it from within the Python script using: os.remove("../output/ometiff/.DS_Store") and then rerunning everything.

I will also do a bug report in the imctools library to make the script more robust towards these random temporary files.

@Black images: are they truely black or do they just look black in a standard image editor? Could you open them in ImageJ and try to adjust the contrast: https://imagej.net/Image_Intensity_Processing

Let me know if this helps! Cheers!

cassandraman commented 5 years ago

Thank you Votti!

I was able to rerun the script and avoid the error. As you suggested, making some adjustments on ImageJ helped with viewing the images, and I was able to visualize them in histocat as well. Really appreciate your help.

votti commented 5 years ago

Cool! In this case I will consider this issue solved. Cheers!