Help exporting multiple movies

I have multiple time series from multiple wells, and I’d like to run an analysis and create a separate movie of each well

I’m using LoadData with this csv as input: exportable_plate.csv (8.89 KB). Note that well_x and well_y are sufficient to group images into series.

Here’s the analysis: organoid.cpproj (377 KB)

If I limit my rows to a single wells worth of data, I get a nice movie as output. However, when I try to process the entire plate, I either get dozens of (single-frame, presumably) ‘movies’, or I keep getting asked if I want to overwrite the movie file.

So, is there a way to produce 1 movie per well (based on the metadata well assignment). Does the fact that I have multiple worker threads interfere with this? It does seem that frames can come out-of-order depending on the complexity of the image when using multiple workers.

What’s the recommended way to do this?

It appears as though you want to select just the “Plate”, “Well_X” and “Well_Y” tags for grouping in LoadData, since those three will give you a unique value for each well. Actually, looking again, selecting “Site_ID” alone might do the trick, since it seems to amount to the same thing. Does that help?

The problem is not with the metadata assignment. I can classify images into site groups either by using the site_id or well_x, well_y metadata fields, as you suggest.

The problem is that I want to make a 8 separate movies, one per well, of the 10 timepoint frames for that well. I’m not sure how to configure the saveImages module to do that.

If I use the sequential numbers naming method, I get 80 ‘movies’ consisting of a single frame each, test0001.avi-test0080.avi.

If I use the “single name” method, then I get prompted to overwrite the single output file (once per frame), e.g.:

Save Images #8, set#51 - Do you want to overwrite c:\testMovie.avi? Save Images #8, set#61 - Do you want to overwrite c:\testMovie.avi? Save Images #8, set#71 - Do you want to overwrite c:\testMovie.avi? Save Images #8, set#11 - Do you want to overwrite c:\testMovie.avi? Save Images #8, set#31 - Do you want to overwrite c:\testMovie.avi?

etc. Obviously, that’s not right either.

So, is there a way to produce 8 movies (one per site_id) for this data set, short of limiting the input rows to a single site and running the script 8 times?

Ah, I see. Thanks for the clarification :smiley:

In SaveImages, you can use metadata tags to name the movies. So in your pipeline, you can name the movie “testMovie_” by right-clicking after “testMovie” and selecting “Site_Id” from the context -menu that appears. The Site_Id with then appear in green as part of the file name. What this does is tell CP to substitute the current value(s) for the tag into the filename, and use the resultant filename for output. Since an analysis worker is assigned for each group (i.e, site_Id), this value will be unique for each worker, and hence, a unique movie should be written for each worker.

Uncheck the “Overwirting without warning” setting, and CellProfiler should then do the right thing.