Statistics

Creating Statistics

To create a statistic, select the Statistic button from the side panel.

Mean

Calculated by summing the values of all events for a given parameter and dividing by the total number of events.

Geometric Mean

Calculated by raising e to the power of the arithmetic mean of the natural logarithm of all events for a parameter.

Formula: Geometric Mean(α) = exp(arithmetic mean(ln(α)))

⚠️ Warning about Geometric Means

Although this statistic is widely used in many disciplines, we advise caution when using it for flow cytometry. The primary issue is that it fails if your dataset contains any event with a non-positive value (i.e., if any event is 0 or negative).

Some flow cytometry software attempt to bypass this issue using techniques like binning. This involves placing all events into a bucket (e.g., 1 to 255) based on the current axis transform applied to the parameter. The geometric mean is then calculated on these binned values and scaled back using the transform.

We have chosen not to implement this functionality in Floreada. The reason is that if you calculate the geometric mean using a specific axis transform, changing that transform and recalculating the mean will yield a different result for the same underlying data. Furthermore, the transform and the number of bins are not recorded in the result, making the calculation non-reproducible.

Therefore, our implementation only works reliably for datasets containing strictly positive values. It will error for other datasets.

Median

Equivalent to calculating the 50th percentile.

Std Dev

Standard Deviation. This is calculated by first finding the mean for all events of a parameter. Then, for each event, we find the square of its distance from the mean, sum these squared distances, and finally divide by the total number of events before taking the square root.

CV

Coefficient of Variation - the ratio between the standard deviation and mean.

Correlation

Pearson Correlation Coefficient for two parameters. Calculated with the following:
r = Σ(xᵢ - x̄)(yᵢ - ȳ) / sqrt(Σ(xᵢ - x̄)² * Σ(yᵢ - ȳ)²)

where:

  • xᵢ = values of first parameter
  • x̄ = mean value of first parameter
  • yᵢ = values of second parameter
  • ȳ = mean value of second parameter

Count

The total number of events contained within the selected population.

Min

The minimum value observed within the population.

Max

The maximum value observed within the population.

Percent

Calculated by taking the number of events in a population and dividing it by the total number of events in the file.

Parent Percent

Calculated by taking the number of events in a population and dividing it by the total number of events in its parent population. If this statistic is applied to a population without a parent (e.g., the file itself), the percentage will be 100%.

Percentile

The value below which a certain percentage of events in a dataset would be found.

Keyword

Every FCS file contains various included keywords. These are key:value pairs that provide metadata about the file, parameters, cytometer, and other data details. Using the Keyword statistic allows you to display the value of a specific keyword.

Label

Allows you to attach a label with a custom, user-defined value to a population.

Delete Statistic

Statistics can be deleted by right-clicking them in the item tree and selecting "Delete." You can also select statistics in the item tree and press the "Delete"/"Backspace" key.

Copy Statistic

Statistics can be dragged and dropped onto other files or gates within the item tree.

Renaming Statistics

When creating a new statistic, you have the option to input a custom display name. You can also rename the statistic at any time by right-clicking its entry in the item tree and selecting "Rename." Providing a custom display name is useful if the fully qualified name of a statistic becomes excessively long due to a deeply nested gating tree, which can be difficult to manage when exported as a CSV file (See Exporting Statistics).

Export Statistics

Statistics can be exported to a CSV file, which can be opened in any spreadsheet application (like Excel) for further analysis. To export stats, click "Export" from the left-hand tools panel then "Statistics". When exported, all statistics from all open files in the current project will be tabulated.

Statistics will be shown in the CSV file using a fully qualified path (e.g., [File]/[Gate]/[Gate]/[Stat]). If you have a very nested gating hierarchy, this path can be difficult to interpret. If you assigned a custom name to the statistic, both the custom name and the full path will be exported, which can aid in further analysis.