HMS-IDAC / UnMicst

UNet script, model, sample data
MIT License
11 stars 12 forks source link

Run failed when input file name with extra "." #13

Closed Mr-Milk closed 2 years ago

Mr-Milk commented 2 years ago

I had an input file name 11ah01522-1.8_slide0_ROI9.ome.tiff. It raised the following error:

Traceback (most recent call last):
  File "/app/UnMicst1-5.py", line 787, in <module>
    if I.dtype == 'float32':
NameError: name 'I' is not defined

This line of code UnMicst1-5.py#L774 will generate:'8_slide0_ROI9.ome.tiff' which does not match any of the fileType in the following branches.

Maybe using a more robust way to get the file extension?

ArtemSokolov commented 2 years ago

Once this is fixed for UnMicst, we will likely want to migrate the issue to https://github.com/labsyspharm/mcmicro Extra . in filenames are likely to cause problems when the pipeline looks for existing intermediates. (For example, https://github.com/labsyspharm/mcmicro/blob/5bf24d0fe822c5c4d028f0728e0ae6a799bc2953/modules/segmentation.nf#L105)

ArtemSokolov commented 2 years ago

Addressed by the following PRs: