Module: ExportToSpreadsheet

Export To Spreadsheet exports measurements into one or more files that can be opened in Excel or other spreadsheet programs

This module will convert the measurements to a comma-, tab-, or other character-delimited text format and save them to the hard drive in one or several files, as requested.

Metadata tokens

ExportToSpreadsheet can write out separate files for groups of images based on their metadata. This is controlled by the directory and file names that you enter. For instance, you might have applied two treatments to each of your samples and labeled them with the metadata names "Treatment1" and "Treatment2", and you might want to create separate files for each combination of treatments, storing all measurements with a given "Treatment1" in separate directories. You can do this by specifying metadata tags for the folder name and file name: Here's an example table of the files that would be generated:

Treatment1Treatment2Path
1M_NaCl20uM_DMSO1M_NaCl/20uM_DMSO.csv
1M_NaCl40uM_DMSO1M_NaCl/40uM_DMSO.csv
2M_NaCl20uM_DMSO2M_NaCl/20uM_DMSO.csv
2M_NaCl40uM_DMSO2M_NaCl/40uM_DMSO.csv

Available measurements

For details on the nomenclature used by CellProfiler for the exported measurements, see Help > General Help > How Measurements Are Named.

See also ExportToDatabase.

Settings:

Select or enter the column delimiter

What delimiter do you want to use? This is the character that separates columns in a file. The two default choices are tab and comma, but you can type in any single character delimiter you would prefer. Be sure that the delimiter you choose is not a character that is present within your data (for example, in file names).

Prepend the output file name to the data file names?

This can be useful if you want to run a pipeline multiple times without overwriting the old results.

Add image metadata columns to your object data file?

"Image_Metadata_" columns are normally exported in the Image data file, but if you check this box they will also be exported with the Object data file(s).

Limit output to a size that is allowed in Excel?

If your output has more than 256 columns, a window will open which allows you to select the columns you'd like to export. If your output exceeds 65,000 rows, you can still open the .csv in Excel, but not all rows will be visible.

Select the columns of measurements to export?

Checking this setting will open up a window that allows you to select the columns to export.

Calculate the per-image mean values for object measurements?

ExportToSpreadsheet can calculate population statistics over all the objects in each image and save that value as an aggregate measurement in the Image file. For instance, if you are measuring the area of the Nuclei objects and you check the box for this option, ExportToSpreadsheet will create a column in the Image file called "Mean_Nuclei_AreaShape_Area".

You may not want to use ExportToSpreadsheet to calculate these measurements if your pipeline generates a large number of per-object measurements; doing so might exceed Excel's limits on the number of columns (256).

Output file location

This setting lets you choose the folder for the output files. You can choose among the following options which are common to all file input/output modules:

Elsewhere and the two sub-folder options all require you to enter an additional path name. You can use an absolute path (such as "C:\imagedir\image.tif" on a PC) or a relative path to specify the file location relative to a directory):

For Elsewhere..., Default Input Folder sub-folder and Default Output Folder sub-folder, if you have metadata associated with your images via LoadImages or LoadData, you can name the folder using metadata tags. You can insert a previously defined metadata tag by either using:

The inserted metadata tag will appear in green. To change a previously inserted metadata tag, navigate the cursor to just before the tag and either:
For instance, if you have a metadata tag named "Plate", you can create a per-plate folder by selecting one of the subfolder options and then specifying the subfolder name as "\g<Plate>". The module will substitute the metadata values for the current image set for any metadata tags in the folder name. Please see LoadImages, LoadData, or Help > Using CellProfiler > How Data Is Handled > Using Metadata In CellProfiler for more details on obtaining, extracting, and using metadata tags from your images.

Create a GenePattern GCT file?

Create a GCT file compatible with GenePattern. The GCT file format is a tab-delimited text file format that describes a gene expression dataset; the specifics of the format are described here. By converting your measurements into a GCT file, you can make use of GenePattern's data visualization and clustering methods.

Each row in the GCT file represents (ordinarily) a gene and each column represents a sample (in this case, a per-image set of measurements). In addition to any other spreadsheets desired, checking this box will produce a GCT file with the extension .gct, prepended with the text selection above. If per-image aggregate measurements are requested above, those measurements are included in the GCT file as well.

Select source of sample row name

(Used only if a GenePattern file is requested)
The first column of the GCT file is the unique identifier for each sample, which is ordinarily the gene name. This information may be specified in one of two ways:

Select the image to use as the identifier

(Used only if a GenePattern file is requested and image filename is used to name each row)
Select which image whose filename will be used to identify each sample row.

Select the metadata to use as the identifier

(Used only if a GenePattern file is requested and metadata is used to name each row)
Choose the measurement that corresponds to the identifier, such as metadata from LoadData's input file. Please see LoadImages, LoadData, or Help > Using CellProfiler > How Data Is Handled > Using Metadata In CellProfiler for more details on obtaining, extracting, and using metadata tags from your images.

Export all measurements, using default file names?

Check this setting to export every measurement. ExportToSpreadsheet will create one file per object type, including image and experiment. It will use the object name as the file name, optionally prepending the output file name if specified above. Leave this box unchecked to specify which objects should be exported or to override the automatic names.

Press button to select measurements to export

(Used only when selecting the columns of measurements to export)
This setting controls the columns to be exported. Press the button and check the measurements or categories to export

Data to export

(Used only when Export all measurements? is left unchecked)
Choose Image, Experiment, or an object name from the list. ExportToSpreadsheet will write out a file of measurements for the given category.

Combine these object measurements with those of the previous object?

(Used only when Export all measurements? is left unchecked)
Check this setting to create a file composed of measurements made on this object and the one directly above it. Leave the box unchecked to create separate files for this and the previous object.

File name

(Used only when Export all measurements? is left unchecked)
Enter a file name for the named objects' measurements. ExportToSpreadsheet will prepend the name of the measurements file to this if you asked to do so above. If you have metadata associated with your images, this setting will also substitute metadata tags if desired. You can insert a previously defined metadata tag by either using: The inserted metadata tag will appear in green. To change a previously inserted metadata tag, navigate the cursor to just before the tag and either: Please see LoadImages, LoadData, or Help > Using CellProfiler > How Data Is Handled > Using Metadata In CellProfiler for more details on obtaining, extracting, and using metadata tags from your images.

Use the object name for the file name?

(Used only when Export all measurements? is left unchecked)
Use the object name as selected above to generate a file name for the spreadsheet. For example, if you selected Image, above and have not checked the Prepend output file name option, your output file will be named "Image.csv". You can name the file yourself if you leave this box unchecked.