Skip to content

Track Metrics

esgomezm edited this page May 24, 2024 · 5 revisions

Track Metrics in CellTracksColab

Track Metrics in CellTracksColab can either be computed in the provided notebooks or directly imported from the tracking software. These metrics are organized into an expandable and collapsible accordion menu grouped by categories for easy navigation. Each category can be individually expanded or collapsed, and all sections are closed by default. A "Select All" checkbox is provided for each category, allowing users to select or deselect all metrics within a category quickly.

Track Metrics Computed in CellTracksColab

Does not support Track splitting.

Supports 3D tracking data.

Track Metrics (Computed Start to End)

The start to end approach calculates metrics over the entire length of the track, providing a comprehensive overview of the track's characteristics from beginning to end. This method is useful for understanding overall trends such as directionality or average speed over the entire track.

These metrics can be computed in the TrackMate, Custom, or Viewer notebooks:

  • Track Duration: The total duration of the track.
  • Mean Speed: The average speed of the track.
  • Max Speed: The maximum speed recorded for the track.
  • Min Speed: The minimum speed recorded for the track.
  • Speed Standard Deviation: The standard deviation of the speeds recorded for the track.
  • Total Distance Traveled: The cumulative distance traveled by the track.
  • Directionality: Provides a measure of the overall direction of a track, indicating the straightness of the path taken.
  • Tortuosity: Measures how convoluted or twisted a path is, with a value of 1 indicating a straight path and higher values indicating more twists and turns.
  • Total Turning Angle: Indicates the cumulative amount of turning along the path, with higher values indicating more turning.
  • Spatial Coverage: Represents the area (2D) or volume (3D) covered by the object's movement.

Metrics Computed Using Rolling Windows

The rolling window approach is particularly useful when comparing tracks of different lengths, especially when the metric is not normalized over time, such as the total distance traveled. By using rolling averages, you ensure that the comparisons account for variations in track length and provide a more consistent basis for analysis.

Choosing the Window Size

  • Window Size: The window_size parameter determines the number of data points considered in each rolling calculation. A larger window size will smooth the data more, averaging out short-term variations and focusing on long-term trends. Conversely, a smaller window size will be more sensitive to short-term changes, capturing finer details of the movement.
  • Selection Tips: The optimal window size depends on the nature of your data and the specific analysis goals. It also depends on the length of your tracks.

These metrics can be computed in the TrackMate, Custom, or Viewer notebooks:

  • Mean Speed Rolling: The average speed within each rolling window.
  • Median Speed Rolling: The median speed within each rolling window.
  • Max Speed Rolling: The highest speed within each rolling window.
  • Min Speed Rolling: The lowest speed within each rolling window.
  • Speed Standard Deviation Rolling: The variability of speeds within each rolling window.
  • Total Distance Traveled Rolling: The average distance traveled within each rolling window.
  • Directionality Rolling: The average directionality within each rolling window, indicating how straight the path is in that segment of the track.
  • Tortuosity Rolling: The average tortuosity within each rolling window, indicating how convoluted or twisted the path is in that segment of the track.
  • Total Turning Angle Rolling: The average total turning angle within each rolling window, indicating how much the direction of movement changes over short segments of the track.
  • Spatial Coverage Rolling: The average spatial coverage within each rolling window, representing the area (in 2D) or volume (in 3D) covered by the tracked object over short segments of the track.

Morphological Metrics

In the notebook, additional morphological and intensity metrics such as the mean, median, standard deviation, minimum, and maximum values of spots parameters are computed for each track when available. These metrics provide detailed insights into the shape, size, and intensity characteristics of the tracked objects.

TrackMate Metrics

These metrics are derived from the information provided by TrackMate in the spots table:

  • Intensity Metrics: Mean, median, min, max, total, and standard deviation of intensities in different channels.
    • Examples: MEAN_INTENSITY_CH1, MEDIAN_INTENSITY_CH1, MIN_INTENSITY_CH1, MAX_INTENSITY_CH1, TOTAL_INTENSITY_CH1, STD_INTENSITY_CH1
  • Shape Metrics: Ellipse parameters, area, perimeter, circularity, solidity, and shape index.
    • Examples: ELLIPSE_X0, ELLIPSE_Y0, ELLIPSE_MAJOR, ELLIPSE_MINOR, ELLIPSE_THETA, ELLIPSE_ASPECTRATIO, AREA, PERIMETER, CIRCULARITY, SOLIDITY, SHAPE_INDEX

The following is a comprehensive list of potential metrics that can be computed:

  • MEAN_INTENSITY_CH1, MEDIAN_INTENSITY_CH1, MIN_INTENSITY_CH1, MAX_INTENSITY_CH1, TOTAL_INTENSITY_CH1, STD_INTENSITY_CH1, CONTRAST_CH1, SNR_CH1
  • ELLIPSE_X0, ELLIPSE_Y0, ELLIPSE_MAJOR, ELLIPSE_MINOR, ELLIPSE_THETA, ELLIPSE_ASPECTRATIO, AREA, PERIMETER, CIRCULARITY, SOLIDITY, SHAPE_INDEX
  • MEAN_INTENSITY_CH2, MEDIAN_INTENSITY_CH2, MIN_INTENSITY_CH2, MAX_INTENSITY_CH2, TOTAL_INTENSITY_CH2, STD_INTENSITY_CH2, CONTRAST_CH2, SNR_CH2
  • MEAN_INTENSITY_CH3, MEDIAN_INTENSITY_CH3, MIN_INTENSITY_CH3, MAX_INTENSITY_CH3, TOTAL_INTENSITY_CH3, STD_INTENSITY_CH3, CONTRAST_CH3, SNR_CH3
  • MEAN_INTENSITY_CH4, MEDIAN_INTENSITY_CH4, MIN_INTENSITY_CH4, MAX_INTENSITY_CH4, TOTAL_INTENSITY_CH4, STD_INTENSITY_CH4, CONTRAST_CH4, SNR_CH4

ilastik Metrics

These metrics are derived from the information provided by ilastik:

  • Shape Metrics: Diameter metrics Number of holes, length of the skeleton, convexity, etc.
    • Examples: Diameter_0, Euclidean_Diameter_0, Number_of_Holes_0, Center_of_the_Skeleton_0, Length_of_the_Skeleton_0, Convexity_0
  • Intensity Metrics: Kurtosis, maximum, mean, minimum, skewness, and total intensity.
    • Examples: Kurtosis_of_Intensity_0, Maximum_intensity_0, Mean_Intensity_0, Minimum_intensity_0, Skewness_of_Intensity_0, Total_Intensity_0

The following is a comprehensive list of potential metrics that can be computed:

  • Diameter_0, Euclidean_Diameter_0, Number_of_Holes_0, Center_of_the_Skeleton_0, Center_of_the_Skeleton_1
  • Length_of_the_Skeleton_0, Convexity_0, Number_of_Defects_0, Mean_Defect_Displacement_0, Mean_Defect_Area_0, Variance_of_Defect_Area_0
  • Convex_Hull_Center_0, Convex_Hull_Center_1, Object_Center_0, Object_Center_1, Object_Area_0
  • Kurtosis_of_Intensity_0, Maximum_intensity_0, Mean_Intensity_0, Minimum_intensity_0
  • Principal_components_of_the_object_0, Principal_components_of_the_object_1, Principal_components_of_the_object_2, Principal_components_of_the_object_3
  • Radii_of_the_object_0, Radii_of_the_object_1, Skewness_of_Intensity_0, Total_Intensity_0, Variance_of_Intensity_0
  • Bounding_Box_Maximum_0, Bounding_Box_Maximum_1, Bounding_Box_Minimum_0, Bounding_Box_Minimum_1, Size_in_pixels_0

Example of Metric Computations

The notebooks compute the mean, median, standard deviation, minimum, and maximum for each of these metrics:

  • Mean Intensity (Channel 1): MEAN_INTENSITY_CH1
  • Median Intensity (Channel 1): MEDIAN_INTENSITY_CH1
  • Min Intensity (Channel 1): MIN_INTENSITY_CH1
  • Max Intensity (Channel 1): MAX_INTENSITY_CH1
  • Total Intensity (Channel 1): TOTAL_INTENSITY_CH1
  • Standard Deviation of Intensity (Channel 1): STD_INTENSITY_CH1

By providing these detailed metrics, CellTracksColab offers comprehensive insights into the characteristics and behavior of tracked objects, supporting advanced analysis and interpretation of tracking data.

Distance to ROI Metrics

These metrics are computed in the CellTracksColab - Distance to ROI notebook. Calculate metrics like MaxDistance, MinDistance, MedianDistance, and more to analyze spatial behavior in relation to ROIs.

Key Distance Metrics:

  • MaxDistance_{ROI_name}: The maximum distance of the track from the ROI during the tracking period.
  • MinDistance_{ROI_name}: The minimum distance of the track from the ROI during the tracking period.
  • StartDistance_{ROI_name} and EndDistance_{ROI_name}: Distances from the ROI at the start and end of the tracking period.
  • MedianDistance_{ROI_name}: The median of all recorded distances to the ROI.
  • StdDevDistance_{ROI_name}: Standard deviation of the distances.
  • DirectionMovement_{ROI_name}: Calculated as EndDistance - StartDistance.
  • AvgRateChange_{ROI_name}: Average rate of change in distance per frame.
  • PercentageChange_{ROI_name}: Percentage change in distance from the start to the end of the track.
  • TrendSlope_{ROI_name}: Slope of a linear regression line fitted to the distance values over time.

These metrics consider the closest ROI to a track at each time point, and are essential for understanding the relative motion between tracks and ROIs.

Track Metrics Fully Imported from Your Tracking Software

Please check the documentation of your tracking software for more details.

Clone this wiki locally