SchmollerLab / Cell_ACDC

A Python GUI-based framework for segmentation, tracking and cell cycle annotations of microscopy data
BSD 3-Clause "New" or "Revised" License
131 stars 22 forks source link

Data Structure Creation for Multiple-Position File Mixes Up Frames #286

Closed AP712 closed 1 year ago

AP712 commented 1 year ago

Description:

Hi Francesco, I have a weird issue with the data structure creation module. My experiments are done using a Nikon microscope, which outputs NIS Elements files (.nd2). Usually I have multiple positions for each time lapse experiment, which I would so far split into single points, then process with ACDC as instructed. Since the option exists to create data structures for files with multiple positions, I tried that, but have the following problem:

The module runs without problems, the number of positions and frames are recognised correctly, and all positions get processed. However, when opening one position in the data prep module, instead of the expected Position 1 - T1, T2, T3 etc (frames of the time lapse), I get P1-T1, P2-T1, P3-T1 etc., with a total number of frames equal to the correct number of them. This happens on both Windows and Apple systems, with the latest software installed.

Any idea what is going wrong?

Thanks a lot for your help! Anastasia

Way to reproduce:

No response

(Optional) Link to data to reproduce error:

No response

Terminal output:

No response

Version information:

No response

ElpadoCan commented 1 year ago

Hi Anastasia, I'm sorry to hear you are having these issues, but we'll fix them. I need to ask you some things to understand the situation if you don't mind.

If I understand correctly, in the first Position, for example, you get a video where the second frame is the first frame of the second position right?

Which option do you choose? The Single microscopy file with one or more positions, right? Do you put only one microscopy file in the folder or multiple files? If you are trying to convert multiple microscopy files, in which each microscopy file has multiple positions that could already be the problem. You need to do one microscopy file at a time (in a separate folder every time). The idea is that one microscopy file is one experiment, and acdc can process one experiment at a time.

If this is not the issue we can try something else. When you get to the window where you can insert the metadata there is an entry called "Order of dimensions" (see screenshot below). What do you insert there? What works for our .nd2 files is ztc.

To check which one is the correct order of dimensions you can choose one and then click on the "eye" icon beside the channel name. There you should be able to visualize the first 4 frames and visually confirm they are correct. If not, close the viewer, change the order of dimensions and check again. Let me know how it goes.

If nothing works, do you have a chance to send me a sample file for me to test with? Does it fit on Google Drive? Thank you very much

Cheers, Francesco

image

AP712 commented 1 year ago

Hi Francesco, thanks for the quick reply. Exactly, instead of the sequence of frames for each position, I get as a second frame the first one of the second position and so on.

I use the "Single microscopy file with one or more positions" option, always working with a single .nd2 file contained alone in a folder to create the data structure. When this file contains only one position (after splitting the multipoints in NIS), the ztc order works perfectly fine.

I tested all combinations for the order of dimensions, unfortunately none seem to work for the multipoint file... My smallest multipoint file is 8GB, it should work with Google Drive. I will send it to you so that you can have a look.

Best, Anastasia

ElpadoCan commented 1 year ago

Yes please, if you can send me the file that will be the fastest for me to check this issue, thanks!

Best, Francesco

ElpadoCan commented 1 year ago

Hi Anastasia, unfortunately, this seems to be an issue with Bioformats and not with Cell-ACDC (see this issue on the Bioformats GitHub page).

Hopefully is going to be fixed soon

ElpadoCan commented 1 year ago

I have some good news. Updating to the latest Bioformats version 6.12.0 (released on the 14th of February 2023, see here) solved this issue!

I still have to release the upgrade yet, but I will do it soon. I will keep you updated thank you for your patience!

Best, Francesco

ElpadoCan commented 1 year ago

Hi Anastasia, I released Cell-ACDC v1.2.7 with the latest Bioformats that should fix this issue.

To update, activate the acdc environment and then run the command pip install --upgrade cellacdc.

Let me know if it works and have a good evening!

Best, Francesco

AP712 commented 1 year ago

Hi Francesco, That was really impressive, thank you so much for all the information and fix! I will update my computers and test it out first thing in the morning. I will close this issue then.

Have a nice evening! Anastasia