Flex files grouping problem

Hi,
I have some problem with opening flex files containing 2 images -RFP and DAPI. My folder contain 36 images, ex. 003002000.flex, 003003000.flex etc.
After LoadImages module I have GroupMovieFrames module to split two channels to separate images. The analysis is working fine, but the name of images
is not correct. For some reason the Loadimages module give the name 00300200.flex_1 instead of 003002000.flex and in the next cycle 003002000.flex_2
instead of 003003000.flex, then 00300300.flex_1 instead of 003004000.flex. Surprisingly the names in GroupMovieFrames do not correspond to those in
LoadImages. For example in cycle 2 in LoadImages it says 003002000.flex_2 (instead of 003003000.flex), but in GroupMovieFrames is 003003000.flex_1 and
003003000.flex_2. But the names in the output files correspond to names in LoadImages module.
Could you help? Thanks a lot.

              Milan

I am running CellProfiler 1.0.7522 on MacOS 10.6.2. I tried also to upload some flex files but “The extension flex is not allowed”. SO I attached just my pipeline.
SKN2RFP_Cellmask_100330PIPE.mat (1.37 KB)

Hi,

The reason you are seeing the names in this format is because the FLEX file format is a special case which CellProfiler handles differently, as if it were a movie or image sequence, and not as if it a set of individual images.

When you use GroupMovieFrames to split the FLEX file, the internal bookkeeping is performed by appending an index ‘_’ to each frame to keep track of them. That’s why you are seeing 003002000.flex_1, 003002000.flex_2 and so on; these are the frames from the file 003002000.flex. Once the two frames are done from the 003002000.flex file, it moves on to 003003000.flex in the same way.

So your pipeline should be fine; it’s just that the display of what’s going is a bit confusing!

Regards,
-Mark

Hi Mark,
The problem is that CellProfiler take the first file 003002000.flex (LoadImage module gives it name 003002000_1.flex) split it into 003002000_1.flex and003002000_2.flex in (GroupMovie module), which is correct.
But in the second cycle he opens next 003003000.flex file (but it name it as 003002000_2.flex in LoadImage module), splits it into 003003000_1.flex and
003003000_2.flex in GroupMovie module (these names are correct and do not correspond to names from LoadImage module).
But in my output file will be the wrong names from LoadImage module).
I do not understand why in LoadImage module appear image names which do not exists and these names figure then in output file.
Thanks a lot for your help.
Milan

Thanks for the clarification. For dealing with FLEX files, you’ll notice that in the number of cycles shown in the Status Window that pops up during processing will increase as it redefines “cycles” from the original definition of “number of FLEX files loaded” to “(number of files)*(number of frames extracted per FLEX file)”, which is now the true number of cycles.

So I think the reason why you are seeing this behavior is that cycle 1 deals with the 1st frame of the 1st file, cycle 2 deals with the 2nd frame of the 1st file, cycle 3 deals with the 1st frame of the 2nd file, and so on. LoadImages keeps track of the file, but GroupMovieFrames has to do some work behind the scenes for bookkeeping purposes, which LoadImages is not aware of.

If there are two FLEX files with two frames each, there should be four rows at data in the output file. Provided I’m understanding the situation correctly, my question to you is: Does the output file have a row of data for each of the two frames, for all the files processed?

Regards,
-Mark

Hi Mark,
thanks a lot.
In the output files there is 36 rows (as the images in the folder), but the row names do not correspond to filenames. The filename 003002000.flex
should have just one row, but actually has two 003002000.flex_1 and 003002000.flex_2. And as there is 36 rows in the output file the las filenames
do not appear at all. I am just thinking now if the problem is that I am not using both channels in my pipeline? Actually CP extract two images from one
flex file, but then I am using just one for object identification and measurement. Maybe this is not correct.
Do I have to do some analysis and export data also for channel I do not need? I was also trying to extract just one channel from flex file, but it did not work.
I need DAPI channel which is in the second position and CP extracted every time RFP channel which is in the first position. Can I extract just the image which is
in the second position?
Thanks a lot for help.
Milan

P.S. I now tried to use both channels for analysis and export, but still have the same problem. I also tried CP 2.0, but CP crashed all the time after I selected
flex movie in LoadImages module.

Hello Milan,

I wanted to try the pipeline you posted with a couple of your sample flex files. Can you please try to post the flex files again? You can get around the board’s posting restrictions (which we don’t have access to, unfortunately) by simply renaming the files’ extensions to something allowed, like “.png” or “.zip”.

Thanks,
David

Hi David,
I tried to upload some files, but they are too big. One file has 5.4 MB and max allowed is 5MB.
Milan

I’ve upped the size limit to 10MB.

Hi I sent some images to david email.
Milan

I’m checking this out now. I can replicate the file naming problem, and am seeing if there is a workaround, with CP1, or possibly CP2. More later.
David

Hi Milan,

We have fixed the flex file bug. However, the fix is only in CP2.0. We have slowed support of CP1 to nearly a halt, so it might be a long time before we fix this in CP1.
So you would have to upgrade to CP2, which is a good thing in the long run anyway.

The other caveat is that the fix involved a lot of fixes, partially because Bioformats (our new primary method of reading in file formats) wasn’t handling flex files properly. So, we haven’t compiled in these changes to any available binary yet, until we are more confident that they are robust. The best way for this to work is if you could download the newest source code yourself and compile http://www.cellprofiler.org/wiki/index.php/Main_Page, but I assume that you are only interested in a compiled version? If so, we could compile a special version for you with these changes. What OS do you use? Win/Mac? 32/64 bit?

Cheers,
David

Hi David,
thanks a lot. I was already trying wit CP2.0 but all the time I chose flex file CP crashed. Is it fixed in the version I could download from web?
I am not computer expert so compiling I can’t do. But I will try with CP2 if it is fixed.
Thanks a lot for your help. Best regards,

Milan

Hi Milan,
No it is not in the version on the website. We still need to build this one specially. I will post the Mac version here when it is done.
David