aarpon / hrm

The Huygens Remote Manager is an open-source, efficient, multi-user web-based interface to the Huygens software by Scientific Volume Imaging for parallel batch deconvolutions.
http://huygens-rm.org
Other
8 stars 9 forks source link

Image name missing in the output name for lif file #20

Closed romainGuiet closed 10 months ago

romainGuiet commented 1 year ago

Hi @aarpon , @ehrenfeu , @fmeyenhofer

Describe the bug I would like to deconvolve images from a lif file image

For example, Project.lif\B23549_pCREB_LTL_1.

At the step 4, it can read the image name within the lif file : image

and in the queue also : image

BUT the HRM output image is named Project_6515058830888_hrm.ids .

Expected behavior I would expect that output name would rather be something like : Project_B23549_pCREB_LTL_1_6515058830888_hrm.ids

To Reproduce I'm happy to share a lif file if needed

Environment Huygens Remote Manager v3.7 (indeed we are a bit late it seems @lacan ) Is it solved with 3.9 ?

Best

Romain

romainGuiet commented 1 year ago

Is it solved with 3.9 ?

I've just seen on the release page :

So I guess it answer my question

romainGuiet commented 1 year ago

Dear all,

after updating HRM to version 3.9, the problem persists....

Best,

Romain

KevinNamink commented 1 year ago

Hi,

I can not reproduce it with HRM 3.9 and HuCore 23.04, which version of Huygens are you using?

Kind regards, Kevin

lacan commented 1 year ago

Hi all,

Looking further into this. The bug exists if the lif file is inside a subfolder of the raw data folder In case it's at the root image

In case it's in a subfolder inside the data folder image

EDIT: @KevinNamink We are using the same versions as you. It's the subfolder that's the issue. Probably it's not taken into account in the regular expression

KevinNamink commented 1 year ago

I don't have subfolder LIF files at hand for testing. If you could sent one that would really help.

I think the problem might indeed be the regex on line 509 in inc/job/JobDescription.php or at the start of that function where the file is retrieved.

Do I understand correctly that you can work around this for now by not saving in a subfolder?

lacan commented 1 year ago

I mean that when you place the lif file inside the "Source" folder of the HRM share as opposed to creating a subfolder and then placing the lif file in there. Some people place it in a subfolder.

It's not the contents of the LIF file that has folders.

Hope this clarifies what I mean

KevinNamink commented 1 year ago

Oh, I understand now. I was unaware using images in subfolders in "Source" was supported at all.

I'll look into this soon.

KevinNamink commented 1 year ago

Maybe the subfolder name was rather long? The maximum string length for the file to use is 191 characters, this string will include such subfolders and also any "subimage" names in the LIF file.

An example could be the string: testFolder/lifFile.lif (Series001) Where if this length would be over 191 characters it would not fit in the database and will cause adding the job to not work. There should then be an error in /var/log/hrm/hrm.log like "hrm.ERROR: Could not add Job to Queue!", not very informative.

KevinNamink commented 1 year ago

I now see the name in screenshot: it is not that long, so this will not be the solution to this problem.

I do notice the space in the path, this does cause problems in various places. I cannot reproduce the exact problem. Deconvolution works for me, but thumbnails will not generate properly. Does the problem persist when not using a space in the folders?

romainGuiet commented 1 year ago

Hi @KevinNamink , thank you for looking into this.

if this length would be over 191 characters

The deconvolution works, and no error is reported. The "only" issue is the output name that does not include the series name when the input is within a subfolder of the raw folder.

Does the problem persist when not using a space in the folders?

I just tested to remove "space" in the path and doesn't change anything input path : "N:\HRM-Share\guiet\Raw\omero\872_cKO-KSP\3759_230314_IF\Project.lif" output path : "N:\HRM-Share\guiet\Deconvolved\omero\872_cKO-KSP\3759_230314_IF\Project_6538a5fcc20cd_hrm.ids"

and within the lif file none of the series have a space (see below) image

Would you like me to share the lif file ?

Best

R

KevinNamink commented 1 year ago

No problem :)

After finding different but related issues that did stop all functionality I indeed forgot the actual issue.

The space could still have introduced different behavior, thanks for testing.

A copy of the file would probably be quite helpful.

lacan commented 1 year ago

Dear @KevinNamink ,

Just got back from holidays. Here is a file https://drive.switch.ch/index.php/s/naRIxkT1vbZHn8C

To reproduce

  1. Place the file at the root of your 'src' folder and run a deconvolution on one of the series
  2. Deconvolution will run fine and a new file will appear under 'dst' with the series name appended to the filename
  3. Now place the file in a subfolder inside your 'src' folder (eg. 'myData'). Run deconvolution on the same series, but make sure you are using the file inside the subfolder
  4. The deconvolution will run fine, but the new file created in 'dst/myData' will not contain the series name Hope this helps

Best

Oli

KevinNamink commented 10 months ago

Sorry for taking a while, but I'm fairly sure I reproduced it with your file and managed to fix it in commit 820034a.