Output control

Controls data export for each analysis run (job) as well as providing the option to run a final macro on all data.

Description

Controls data export for each analysis run (job) as well as providing the option to run a final macro on all data. If running a single file analysis, by default, the spreadsheet will be saved with the same name as the input file and stored at the same location. Whereas, in batch mode (running multiple files from a folder) the spreadsheet will be saved in that folder with the same name as the input folder. Using the "Group save location" parameter it's possible to redirect the output spreadsheet(s) to a specific location.

Data can be collated into a single Excel spreadsheet, or exported as one spreadsheet per analysis run (job). Exported spreadsheets are separated into multiple sheets:

  • "Parameters" An overview of the analysis setup (path to workflow file, date run, computer operating system) along with a list of all modules and parameters, their values and states. The information here should be sufficient to reconstruct the analysis workflow in the absence of the original workflow file.
  • "Log" A list of any error messages presented to the user while the analysis was running.
  • "Summary" Each analysis run is summarised by a single line (or one line per timepoint or metadata value, if selected) containing metadata values, image measurements, the number of objects detected as well as statistics for object collections (e.g. mean of a particular measurement). The summary sheet is intended to facilitate quick analysis; all data contained in this sheet (with the exception of image measurements) can be manually compiled from the individual object sheets. This sheet can be enabled/disabled using the "Export summary" parameter.
  • "[Object-specific sheets]" Each object collection can export to a separate sheet. These sheets contain one row per object in that collection and include metadata values, along with all measurements and relationships for that object. This sheet can be enabled/disabled using the "Export individual objects" parameter.

It's also possible to select the data to be exported for each sheet, including the metadata values (filename, series number, etc.), individual measurements and object collection statistics.

Parameters

Parameter Description
Add variable Pre-define variables, which will be immediately accessible within the macro. These can be used to provide user-controllable values to file-based macros or to prevent the need for editing macro code via the "Output control" panel.
Variable type Controls the data type of the variable that will be assigned within the macro:
  • "Boolean" Variable will be assigned a true/false value depending on whether the checkbox was selected/deselected (respectively).
  • .
  • "Number" Variable will be assigned a numeric value to which mathematical operations can be applied.
  • .
  • "Text" Variable will be assigned a text value. Irrespective of whether the value contains only numeric characters this will be interpreted as text.
.
Variable name The variable value can be accessed from within the macro by using this variable name.
Variable checkbox Boolean (true/false) value assigned to this variable if "Variable type" is set to "Boolean".
Variable numeric value Numeric value assigned to this variable if "Variable type" is set to "Number".
Variable text value Text value assigned to this variable if "Variable type" is set to "Text".
Run macro When selected, a final macro can be run once all the analysis runs (jobs) have been completed. By using the workspace handling macros ("MIA_GetListOfWorkspaceIDs"and "MIA_SetActiveWorkspace") it's possible to switch between workspaces, thus facilitating dataset-wide analyses. This macro will be executed only once as part of the final data exporting phase of the analysis.
Macro mode Select the source for the macro code:
  • "Macro file" Load the macro from the file specified by the "Macro file" parameter.
  • "Macro text" Macro code is written directly into the "Macro text" box.
Macro text Macro code to be executed. MIA macro commands are enabled using the "run("Enable MIA Extensions");" command which is included by default. This should always be the first line of a macro if these commands are needed.
Macro file Select a macro file (.ijm) to run once, after all analysis runs have completed.
Export mode Controls the number of results spreadsheets that are exported and what they contain:
  • "All together" Results from all current analysis runs are grouped into a single spreadsheet. The same sheets are used for all runs, so it's necessary to include a filename (and where necessary, a series name/number) metadata identifier. Unless "Save name mode" is set to "Specific name", this file is named after the input file/folder.
  • "Group by metadata" Results are grouped and exported by a specific metadata item associated with each analysis run. Unless "Save name mode" is set to "Specific name", the files are named in the format "[input file/folder name]_[metadata name]-[metadata value]". The metadata item to group on is specified by the "Metadata item for grouping" parameter.
  • "Individual files" A separate results spreadsheet is saved for each analysis run.
  • "None" No results spreadsheets are exported.
Individual save location If "Export mode" is set to "Individual files" this parameter controls where the individual results files are saved:
  • "Mirrored directory" The files are saved in a mirrored directory structure. This structure has the same folder layout as all subfolders of the specified input folder. The root location of the mirrored structure is specified by the "Mirrored directory root" parameter.
  • "Save with input file" The files are saved in the same folder as the input file. If a folder was selected as the input, the result files are saved directly inside that folder.
  • "Specific location" The files are all saved in a single folder specified by the "File path" parameter.
Group save location If "Export mode" is set to "Group by metadata" this parameter controls where the grouped (by metadata) results files are saved:
  • "Save with input file" The files are saved in the same folder as the input file. If a folder was selected as the input, the result files are saved directly inside that folder.
  • "Specific location" The files are all saved in a single folder specified by the "File path" parameter.
File path The path to the folder where results will be saved if using a specific folder path.
Mirrored directory root If using a mirrored directory structure for the results files, this parameter specifies the output structure root. Subfolders will be created within this root folder that have identical structure to the subfolders of the input folder.
Save name mode Controls how the output results filename is generated:
  • "Match input file/folder name" Results files are stored with the same name as the input file/folder (depending on the "Export mode" parameter).
  • "Specific name" Results files are stored with a specific name, specified by "File name".
File name Name to save the results file with if saving results files with a specific name ("Save name mode" parameter).
Metadata item for grouping If "Export mode" is set to "Group by metadata", results will be grouped and saved by the value of this metadata item associated with each analysis run. There will be one results spreadsheet for each unique value of this metadata item.
Continuous data export When selected, the results spreadsheet(s) can be exported at intervals during a multi-analysis run. They will be exported every N runs, where N is controlled by the "Save every n files" parameter. The spreadsheet(s) will still be stored when all analysis runs have completed.
Save every n files If "Continuous data export" is enabled, the current version of the spreadsheet will be exported after every N analysis runs. This means if the analysis fails or the computer crashes, results collected so far are not lost.
Append date/time mode Controls under what conditions the time and date will be appended on to the end of the results file filename. This can be used to prevent accidental over-writing of results files from previous runs:
  • "Always" Always append the time and date on to the end of the filename.
  • "If file exists" Only append the time and date if the results file already exists.
  • "Never" Never append time and date (unless the file is open and unwritable).
Export summary When selected, a summary sheet will be added to the results spreadsheet. The summary sheet contains either (1) one row per input image file, (2) one row per timepoint per image file or (3) one row per metadata item. The export mode is controlled by the "Summary mode" parameter. This sheet is given the name "SUMMARY" and contains statistics for measurements (mean, min, max, standard deviation and sum), object counts and metadata items.
Summary mode Controls the form of the summary sheet (if "Export summary" is selected):
  • "Per timepoint per input file" Each timepoint of each input image file is summarised in a separate row.
  • "Group by metadata" All files matching a specific metadata value are averaged and summarised in a separate row (i.e. one row per unique metadata item).
  • "Per input file" Each input image file is summarised in a separate row.
Metadata item for summary The metadata item to group the rows of the summary sheet by if "Summary mode" is set to "Group by metadata".
Show object counts When selected, the "Summary" results sheet displays columns reporting the number of objects per object collection.
Export individual objects When selected, individual results sheets will be created for each object collection. In these sheets, each object in that collection is summarised per row. The individual object sheets have the same name as their corresponding object collection.