Nanostring-Biostats / CosMx-Analysis-Scratch-Space

This repository is an exploratory resource to accelerate opensource analysis of CosMx® Spatial Molecular Imager (SMI) data. Contained here are and writeups and vignettes addressing a variety of topics discussed when analyzing single-cell spatial data.
https://nanostring-biostats.github.io/CosMx-Analysis-Scratch-Space/
Other
34 stars 4 forks source link

Make_composite gets an input/output error #83

Closed asmilagswash closed 3 months ago

asmilagswash commented 4 months ago

Composite script started


Please specify a clipping percentage as an integer or float: 3

Please specify one of the allowed image format types [jpg, png, tif]: tif

Setting the clipping value for autocontrast to 3.0% and the export format to tif

Checking for existing folders and creating the necessary folders.. Folders successfully created!

Please wait: Processing the files in /mnt/c/Users/lagwankar/Downloads/CosMx10_K22_84_7_20240229D_10_07_2024_1_22_13_100/RawFiles/K22_84_7/20240229_225841_S4/CellStatsDir/Morphology2D

...Extracting tif files (raw) from layered 2D morphology image files

...Converting raw files to 8bit of type tif and creating 8bit autocontrast files Traceback (most recent call last): File "/mnt/c/Users/lagwankar/Downloads/make_composite.py", line 246, in ImageOps.autocontrast(img, cutoff = clipping, ignore = None, preserve_tone = False).save(f"{image_file.replace('_raw', '_8bit_autocontrast')}", compress_type = compress_value)
File "/home/asmilags/.local/lib/python3.10/site-packages/PIL/Image.py", line 2459, in save save_handler(self, fp, filename) File "/home/asmilags/.local/lib/python3.10/site-packages/PIL/TiffImagePlugin.py", line 1886, in _save ImageFile._save( File "/home/asmilags/.local/lib/python3.10/site-packages/PIL/ImageFile.py", line 538, in _save _encode_tile(im, fp, tile, bufsize, fh) File "/home/asmilags/.local/lib/python3.10/site-packages/PIL/ImageFile.py", line 565, in _encode_tile errcode = encoder.encode_to_file(fh, bufsize) OSError: [Errno 5] Input/output error

We've been trying to run the make_composite script and create cell Composite files but I keep getting this error. any idea how to resolve this? Is there any way to debug this?

eveilyeverafter commented 3 months ago

I'm not sure if you have found a solution or not but it looks like you might be trying to access the raw data on a networked drive and are getting a timeout error. Is that correct?

source: https://github.com/googlecolab/colabtools/issues/510

asmilagswash commented 3 months ago

hey I was able to solve it , I think it was because I was using linux and the permissions set on it are different so I got that error even on a local machine. But I ran the make_composites script via windows powershell and it seems to be working fine ! thanks!