How to compute the duration between two events
This guide shows you how to compute the time difference between two events (e.g. t_spread - t_firstdetection) and visualize it as a stripplot against a biological condition.
Prerequisite: You must have a table with two numeric columns representing the time of two events (e.g. t_firstdetection and t_spread).
Reference keys: event duration
Step-by-step:
Open your project and load the experiment.
Select the wells and positions of interest in the Control Panel.
Click on the Explore table button to open the table view.
Go to Math > Subtract….
In the dialog:
Set Column 1 to the later event time (e.g.,
t_spread).Set Column 2 to the earlier event time (e.g.,
t_firstdetection).Click Compute.
A new column named
t_spread-t_firstdetection(or similar) will be added to the table.(Optional) Rename the new column for clarity:
Select the new column header.
Go to Edit > Rename….
Enter a new name, for example
hovering duration.
(For tracked data) Go to File > Collapse tracks…:
In the dialog, keep global operation selected.
Choose mean (or first) as the operation to ensure one value per track.
Click Apply.
A new table window will open with the collapsed data (one row per track). Continue the next steps in this new window.
In the new window, go to File > Plot… (or press
Ctrl+p).In the Set 1D plot parameters dialog:
Check the representation you want, for example strip (stripplot), boxplot, or violin.
Set x to the grouping variable (e.g.,
well_nameorantibody).Set y to the duration column (e.g.,
hovering duration).(Optional) Set hue to color by another variable.
Click set.
A new plot window will open with the requested representation.