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.

 

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.

In addition to extracting metadata from the image files and providing names for different channels (if applicable), the following CellProfiler analysis modules are required or must be amended in the pipeline order for export to FCS Express: Convert Objects to Images, Save Images, and Export to Spreadsheet. The completed pipeline for this example can be found in the Tutorial Sample Data archive and is named Section2pipelineCOMPLETED.cpproj. 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 the 5 and 10 minute time point images folder. These images are based on the "Human cytoplasm-nucleus translocation assay (Vitra Image)" from the previous module.

 

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

Selecting Default Output Folder

To organize your data correctly for FCS Express, ensure the Default Output Folder is the same folder where your images are stored and used for Default Input Folder (example in Figure T26.14 below).  

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, you can select Do not write MATLAB or HDF5 files from the Output file format drop-down menu.

Figure T26.14  Set the Default Input and Output Folders to the Same Location

Figure T26.14  Set the Default Input and Output Folders to the Same Location

A.  Loading Images, Extracting Metadata, Assigning Names

In order for FCS Express to recognize your data is in 96-well format, 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 in CellProfiler (Figure T26.15):

1.Click Images category in left column of CellProfiler window.

2.Drag and drop 5 and 10 minute time point images folder from archive folder into designated area in CellProfiler.

3.Click Metadata category directly below Images.

4.Click Yes radio button in the Extract metadata? box.

5.Confirm Metadata extraction drop-down list is set to Extract from file/folders.

6.Confirm Metadata source drop-down list is set to File name.

7.Click the magnifying glass icon to the right of Regular Expression to field.

8.Erase all text from Regex: field.

9. Copy and paste following text into Regex: field, which will define the Channel Number and time with a number:

Channel(?P<ChannelNumber>[0-9]{1,2})-(?P<time>[0-9]{2})-min.tif

10. Click Submit in Regular expression editor window.

11. Click Update button in lower portion to see information extracted for each of the four images.

12. Click NamesandTypes directly below Metadata.

13. Change Assign a name to drop-down list to Image matching rules.

14. Enter Channel2- in blank field to right of Contain drop-down list.

15. Confirm DNA is entered in Name to assign these field.

16. Click Add another image button.

17. For second image set, enter Channel1- in blank field to right of Contain drop-down list.

18. Replace GFP in Name to assign these field with Cytoplasm.

19. Click Update button in lower portion.

 

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 T26.15  Setting Up a Regular Expression in the LoadImages Module

Figure T26.15  Setting Up a Regular Expression in the LoadImages Module

 

B.  ConvertObjectsToImage Modules

In these modules, 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 T26.16 for an example of the module window.

1.Select the first ConvertObjectsToImage module in the pipeline.

2.Choose Nuclei from Select the input objects drop-down list.

3.Enter Nuclei in the Name the output image field.

4.Select uint 16 from the Select the color type drop-down list.

5.Select the second ConvertObjectsToImage module in the pipeline.

6.Choose Cells from Select the input objects drop-down list.

7.Enter Cells in the Name the output image field.

8.Select uint 16 from the Select the color type drop-down list.

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.

 

C.  SaveImages Module

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

1.Select the first SaveImages module in the pipeline.

2.Set the Select the type of image to save drop-down list to Image.

3.Choose Cells for the Select the image to save drop-down list.

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

4.Set the Select method for constructing file names drop-down list to Single name.

5.Enter CellLabel_ in the Enter single file name field to replace OrigBlue.

6.Right-click after immediately after the underscore of CellLabel_ and choose time.

7.Select the second SaveImages module in the pipeline.

8.Set the Select the type of image to save drop-down list to Image.

9. Choose Nuclei for the Select the image to save drop-down list.

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

10. Set the Select method for constructing file names drop-down list to Single name.

11. Enter NucleiLabel_ in the Enter single file name field to replace OrigBlue.

12. Right-click after immediately after the underscore of NucleiLabel_ and choose time.

a.Perform steps 13-18 on both SaveImages modules set up for CellLabel and NucleiLabel.

13. Confirm tiff from the Saved file format drop-down list.

14. Set Image bit depth drop-down list to 16-bit integer.

15. Choose Default Output Folder from Output file location drop-down list.

16. Click Yes radio button in the Overwrite existing files without warning? box.

17. Set When to save as Every cycle from the drop-down list.

18. Click Yes radio button in Record the file and path information to the saved image? box.

The SaveImages module for CellLabel should now look like Figure T26.16 below.

Figure T26.16  ConvertObjectsToImage Module: Defining Nuclei and Cells Image Masks

Figure T26.16  ConvertObjectsToImage Module: Defining Nuclei and Cells Image Masks

D.  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 CellProfiler Export section)

1. Select the ExportToSpreadsheet module.

2. Confirm the Select the column delimiter drop-down list is set to Comma (",").

3. Choose Default Output Folder from the Output file location drop-down list.

4. Click No radio button in the Add a prefix to file names? box.

5. Click No radio button in the Export all measurement types? box.

6. Choose Image from the first Data to export drop-down list.

7. Click No radio button in the Use the object name for the file name? box.

8. Replace DATA.csv with Image_.cptoc in File name field.

9. Right-click between the underscore and period; click time.

10. Click Add another data set button.

11. Choose Nuclei from the second Data to export drop-down list.

12. Click No radio button in the Use the object name for the file name? box.

13. Replace DATA.csv with nuclei_.cpout in File name field.

14. Right-click between the underscore and period; click time.

15. Click Add another data set button.

16. Repeat steps 10-12 for "Cells" and set the file name as cells_.cpout.

17. Right-click between the underscore and period; click time.

The ExportToSpreadsheet module options should look like Figure T26.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 T26.17  ExportToSpreadsheet Module

Figure T26.17  ExportToSpreadsheet Module

18. Click 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 T26.18).

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

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

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