In the next two sections, you will learn:

How to export CellProfiler data from a set of single images that were not obtained from a 96 well plate.
How to import the data into FCS Express V5.

 

This section pertains to data from a set of single images that were not obtained from a 96 well plate such as images obtained from a slide.

The CellProfiler modules that are needed or must be amended for export to FCS Express in this section are LoadImages, ConvertObjectsTo Images, SaveImages, and ExportToSpreadsheet. The completed pipeline for this example can be found in the Tutorial Sample Data archiveand is named Section2pipelineCOMPLETED.cp. The completed pipeline is meant to be used as a template for comparison to your pipeline and represents the finished product of this tutorial.

The sample images in the example data set we will be using can be found in the Tutorial Sample Data archive and are labeled "5 and 10 minute time point images". These images are based on the "Human cytoplasm-nucleus translocation assay (SBS Bioimage)" sample experiment found at CellProfiler Examples.

 

cellprofilerexamplelink

 

The steps for exporting data from CellProfiler have been broken down by module. After loading the Section2pipeline.cp, follow the steps below to amend the pipeline to prepare for export to FCS Express.

Selecting Default Input and Output Folders

To organize your data correctly for FCS Express, first ensure that the default input (where your images are stored) and output folders in CellProfiler are set to the same folder in the Input/Output Folder window (Figure T24.13).

Note: The DefaultOUT.mat file will also be exported to the Output Folder. This file is for use in MATLAB. If you do not wish to use this file, we recommend deleting it to conserve disk space.

 

Figure T24.13  Set the Default Input and Output Folders to the Same Location

Figure T24.13  Set the Default Input and Output Folders to the Same Location

 

LoadImages Module Setup

In order for FCS Express to recognize your data throughout the pipeline, metadata from the image file names must be extracted. A Regular Expression must be defined to find the metadata in the file name or path of the data by following these steps (Figure T24.14):

1.Click on the Channel2- drop-down list labeled Extract metadata from where?.
2.Select which metadata you wish to use. For this example, choose File name.
3.Enter the "Regular Expression" you wish to use in the field labeled Regular expression that finds metadata in the file name. For this example we will use "Channel2-[0-9]{2}-(?P<Row>[A-H])-(?P<Column>[0-9]{2}).tif" which defines the plate location of the image by Row Letter and Column Number found in the image name.

 

Notes:

Follow these links for a tutorial on "Regular Expressions" and how to translate regular expressions.
Setting up metadata and regular expressions only has to be done for one image in the set. For this example, it has been set up for channel 2.
The regular expression output names: Well, Row, Column, and Col may only be used with plate based or montage imaging experiments. Using any of these names for a single image experiment will result in a non-working export.

 

Figure T24.14  Setting Up a Regular Expression in the LoadImages Module

Figure T24.14  Setting Up a Regular Expression in the LoadImages Module

 

ConvertObjectsToImage Modules

In this module, the objects you have defined through the "Identify Primary/Secondary Objects" module will be converted to image masks that FCS Express will use during import and analysis. See Figure T24.15 for an example of the module window.

4. Select the first ConvertObjectsToImage module in the pipeline.
5. Choose Nuclei from the Select the input objects drop-down list.
6. Name the output image with any name you prefer. For this example, use "Nuclei".
7. Select the color type from the drop-down list and choose uint16 (Figure T24.15).
8. Select the second ConvertObjectsToImage module in the pipeline.
9. Choose Select the input object as Cells from the drop-down list.
10. Name the output image with any name you prefer. For this example, use "Cells".
11. Select the color type from the drop-down list and choose uint16.

Note: Repeat steps 4-7 for as many objects you have defined through the Identify Primary/Secondary Objects module when defining your own pipeline.

(Note: In order for FCS Express to properly import the data the Name the output image name must be the same as the Select the input objects name and is case sensitive)

 

Figure T24.15  ConvertObjectsToImage Module: Defining Nuclei and Cells Image Masks

Figure T24.15  ConvertObjectsToImage Module: Defining Nuclei and Cells Image Masks

 

SaveImages Module

The image masks that were defined in the ConvertObjectsToImage module must now be saved and related to the original images/data.

12. Select the first SaveImages module in the pipeline.
13. Select the type of image to save as Image from the drop-down list.
14. Select the image to save as Cells.

Note: When defining your own pipeline, select the appropriate image you defined in the ConvertObjectsToImage module.

15. Select method for constructing file names as single name from the drop-down list.
16. Enter single file name as any name you prefer followed by a hyphen "-". For this example use CellLabel-.
17. Right-click after CellLabel-, choose time.
18. Select the second SaveImages module in the pipeline.
19. Select the type of image to save as Image from the drop-down list.
20. Select the image to save as Nuclei.
21. Select method for constructing file names as Single name from the drop-down list.
22. Enter single file name as any name you prefer followed by a hyphen "-". In this example we have chosen NucleiLabel-.
23. Right-click after NucleiLabel-, choose time.

Note: "time" value you defined as regular expressions for the load images module. Using regular expressions allows every output file to be assigned a unique file name based on the text from the input file name. This will prevent output file names from overwriting each other and allow FCS Express to identify the unique image mask associated with each image file.

Perform steps 24-30 on both SaveImages modules set up for CellLabel and NucleiLabel.

24. Select the format to use as tif from the drop-down list.
25. Set Image bit depth at 16 from the drop-down list.
26. Choose Default Output Folder from Output file location.
27. Check the Overwrite existing files without warning? box.
28. Set Select how often to save as Every cycle from the drop-down list.
29. Select colormap as gray from the drop-down list.
30. Check the Update file names within CellProfiler? box.

 

The SaveImages module for CellLabel should now look like Figure T24.16a.

(Note: in CellProfiler Version 2 the Update names within CellProfiler? check box has been renamed Store file and path information to the saved image? Figure T24.4b)

 

Figure T24.16a  Defining the SaveImages Module

Figure T24.16a  Defining the SaveImages Module

Figure T24.16b Defining the SaveImages Module in CellProfiler V2

Figure T24.16b Defining the SaveImages Module in CellProfiler V2

ExportToSpreadsheet Module

Now that all of the images and object image masks have been defined and saved for analysis, you must now ask CellProfiler to export the measurements you wish to view in FCS Express. For this example, we will export all measurements.

(Note: If you would like to only export certain parameters please see the Selecting Individual Parameters for CellProlifer Export section)

31. Select the ExportToSpreadsheet module.
32. Select or enter the column delimiter by choosing Comma (",") from the drop-down list.
33. Uncheck the Prepend the output file name to the data file names? box.
34. Choose Output file location as Default Output Folder from the drop-down list.
35. Uncheck Export all measurements?.
36. Choose Image from the first Data to export drop-down list.
37. Uncheck Use the object name for the file name?.
38. Set the file name as Image.cptoc.
39. Choose Add another data set.
40. Choose Nuclei from the second Data to export drop-down list.
41. Uncheck Use the object name for the file name.
42. Set the file name as nuclei.cpout.
43. Repeat steps 39-42 for "Cells" and set the file name as cells.cpout.

The ExportToSpreadsheet module options should look like Figure T24.17 when you are done.

Note 1: on file extensions: ".cptoc" stands for CellProfiler Table of Contents and ".cpout" stands for CellProfiler Output. The "Image.cptoc" file stores information about the location and number of images for all objects processed in the pipeline, while the separate "Nuclei.cpout" and "Cells.cpout" store the actual listmode data associated with individual objects and analysis. There should be a separate ".cpout" file defined for each object mask defined in CellProfiler. Only one "Image.cptoc" file is needed.

Note 2:The name of your .cpout file must begin with the name of the object data you are exporting and may only be include the object name and regular expressions. For example: the file names nuclei.cpout and nuclei_<regular express>.cpout will result in a proper export while dataset1nuclei.cpout or <regularexpression>_nuclei.cpout will resulting in a non-working export.

 

Figure T24.17  ExportToSpreadsheet Module

Figure T24.17  ExportToSpreadsheet Module

 

44. Select Analyze images to run the pipeline. The folder where your images are stored will now contain the cells.cpout, nuclei.cpout and Image.cptoc files for each time point. There will also be a CellLabel and NucleiLabel image associated with every original image from the experiment (Figure T24.18).

 

Figure T24.18  Example of Output Folder once CellProfiler Analysis is Complete

Figure T24.18  Example of Output Folder once CellProfiler Analysis is Complete

 

In the next section, we will import the single image experiment into FCS Express.