-
Notifications
You must be signed in to change notification settings - Fork 4
Plotting Track Metrics
In this section, users can generate visual representations and statistical analyses of the computed track parameters. All generated data and graphs are automatically saved in the designated results folder.
Note: The computed parameters are based on the units provided when tracking your data. If you're using the Custom notebook, the units can be defined during the calibration step.
-
Visualize Track Parameters: Create box plots for all available track parameters using
matplotlibandseaborn, two popular Python visualization libraries. Each biological repeat is represented as individual data points, color-coded for distinction. - Statistical Analyses: Examine metrics like Cohen's d, a Randomization Test, a t-test, and the Bonferroni Correction. All are displayed as mirrored heat maps.
- Save Your Results: All your generated graphs and data are automatically saved in your results folder, ensuring you can revisit and share your findings.
The metrics can be computed in the previous section of the notebook, in other CellTracksColab notebooks, or imported directly from the tracking software. To make the selection process user-friendly, the metrics are categorized as follows:
-
Track Metrics: Includes fundamental metrics such as Track Duration, Mean Speed, Median Speed, Max Speed, Min Speed, Speed Standard Deviation, Total Distance Traveled, Spatial Coverage, Tortuosity, and Total Turning Angle.
-
Rolling Track Metrics: Calculated over a rolling window, including Mean Speed Rolling, Median Speed Rolling, Max Speed Rolling, Min Speed Rolling, Speed Standard Deviation Rolling, Total Distance Traveled Rolling, Directionality Rolling, Tortuosity Rolling, Total Turning Angle Rolling, and Spatial Coverage Rolling.
-
Morphological Metrics: Metrics related to shape and size (when available).
-
Distance to ROI Metrics: Calculated relative to regions of interest and computed in the CellTracksColab distance to ROI notebook (ROIs).
In addition to metrics computed within CellTracksColab, we import metrics computed directly by the tracking software.
These metrics are organized into an expandable and collapsible accordion menu grouped by the categories above. 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.
Learn more about the parameters available on our wiki.
Cohen's d measures the size of the difference between two groups, normalized by their pooled standard deviation. Values can be interpreted as small (0 to 0.2), medium (0.2 to 0.5), or large (0.5 and above) effects. It helps quantify how significant the observed difference is, beyond just being statistically significant.
This non-parametric test evaluates if observed differences between conditions could have arisen by random chance. It shuffles condition labels multiple times, recalculating Cohen's d each time. The resulting p-value, which indicates the likelihood of observing the actual difference by chance, provides evidence against the null hypothesis: a smaller p-value implies stronger evidence against the null.
This statistical test compares the means of different conditions to determine if they are statistically different. The t-test calculates p-values based on the means of the repeats, as described in the SuperPlots methodology.
Given multiple comparisons, the Bonferroni Correction adjusts significance thresholds to mitigate the risk of false positives. By dividing the standard significance level (alpha) by the number of tests, it ensures that only robust findings are considered significant. However, it's worth noting that this method can be conservative, sometimes overlooking genuine effects.
-
Randomization Test:
- Advantages: Non-parametric, does not assume normal distribution.
- Disadvantages: Computationally intensive, especially with a large number of conditions.
- Best Use: When you have a small number of repeats or suspect that your data may not follow a normal distribution.
-
t-tests:
- Advantages: Faster computation, widely understood and used.
- Disadvantages: Assumes normal distribution of data.
- Best Use: When you have a larger number of repeats and believe that your data follows a normal distribution.
Resampling is a statistical method used to balance the dataset. It involves adjusting the dataset to ensure that each condition or experimental group has an equal or nearly equal number of tracks. This process is crucial for maintaining the validity and reliability of statistical analyses by preventing biases that can arise from unequal sample sizes.
Resampling should be used when:
- Your dataset has unequal group sizes, which could lead to biased statistical analysis.
- You aim to compare different experimental conditions or biological repeats and need to ensure that each group is equally represented.
The resampling process involves the following steps:
- Downsampling: The larger groups in the dataset are downsized to match the number of tracks in the smallest group. This is achieved by randomly selecting tracks from these larger groups.
-
Reproducibility: A
random_seedparameter ensures reproducibility. - Maintaining Data Integrity: Care is taken to ensure that the downsampling process does not significantly alter the inherent properties of the dataset.
To evaluate the impact of resampling, the following steps are undertaken:
-
Kolmogorov-Smirnov Test: This statistical test compares the distribution of each numerical column in the original and resampled datasets to assess if there is a significant change. The Kolmogorov-Smirnov p-values are saved as a CSV file in the
Balanced_datasetdirectory within yourResults_Folderfor further analysis or record-keeping. -
Visualization: Heatmaps are generated to represent the Kolmogorov-Smirnov p-values visually, providing an easy way to identify significant differences in distributions. These heatmaps are saved in a PDF file in the
Balanced_datasetdirectory within yourResults_Folder.
When plotting your entire dataset, your plots are safely stored in:
-
PDF Format:
track_parameters_plots/pdfdirectory in your results folder. -
CSV Format:
track_parameters_plots/csvdirectory in your results folder.
When plotting your resampled dataset, your plots are safely stored in:
-
PDF Format:
Balanced_dataset/track_parameters_plots/pdfdirectory in your results folder. -
CSV Format:
Balanced_dataset/track_parameters_plots/csvdirectory in your results folder.
Remember always to verify the units and parameters throughout your analysis to maintain accuracy and consistency in your interpretations.
π Home
- π Data requirement and supported software
- π Running CellTracksColab using Google Colab
- π Running CellTracksColab locally
- π The TrackMate notebook
- π The Custom notebook
- πΌοΈ The Viewer notebook
- π Track Visualization
- π Track Filtering
- π Track Metrics
- β Quality Control
- π Plotting Track Metrics
- π Explore your high-dimensional data
- π Distance to ROI analyses
- π Spatial Clustering analyses



