I wrote a script that calls CellProfiler, runs a pre-defined .cpipe pipeline, and then further operates on the output images. When I was using single channel .tif images where the channel name was included in the filename, my script and pipeline worked fine. However, I’d like to switch to the original multichannel .czi image with the channel names stored in the metadata. I reconfigured the pipeline to extract the channel names from image file headers. However, the metadata isn’t parsed until I click the “Updata metadata” button at the top and then the “Update” button at the bottom left of the Metadata module.
My script launches CellProfiler using the following command:
“-c -r -i “C:\MyPath\InputFolder” -o “C:\MyPath\OutputFolder” -p “C:\MyPath\Colocalization.cppipe” --file-list “C:\MyPath\CellProfiler_FileList.txt””
However, none of the expected outputs appear in my OutputFolder despite the same pipeline working fine and producing the outputs in the default output folder when launched manually from CellProfiler. Additionally, I checked and “CellProfiler_FileList” is being populated with the correct input files. And again, my script is able to successfully launch Cell Profiler and generate the appropriate outputs when the .cpipe is modified to expect channel names in the file name rather than the metadata.
I suspect the problem may be occurring because the functions called by the “Updata metadata” and/or “Update” buttons aren’t being called when running the pipeline programatically. Is there a way to force these function calls or make sure that the metadata is being imported?