-
Notifications
You must be signed in to change notification settings - Fork 0
Visualizing and Editing Bacterial Tracking
TrackRefiner provides a graphical user interface to visualize bacterial tracking results and allows users to edit the tracking information.
To launch the tool, use the following command in your terminal or command prompt:
trackrefiner-track-editor
Upon running this command, you will see the interface shown below with the following inputs:
- TrackRefiner Refined Tracking CSV File: Path to the CSV file generated by TrackRefiner containing refined bacterial tracking results.
- Neighbor CSV File: Path to a CSV file containing bacterial neighbor data, exported by TrackRefiner.
- Bacteria Raw Images Directory: Path to the directory containing raw bacterial microscopic images in TIFF, PNG, or JPG format.
- Pixel Per Micron (optional): Conversion factor for pixels to micrometers.
- Bacteria Info Font Size (optional): Adjusts the font size for displayed bacterial information.
- Pick Bacteria Color (optional): Allows users to select a color for bacterial objects.
After specifying the path to the TrackRefiner Refined Tracking CSV File, Neighbor CSV File, and Bacteria Raw Images Directory, as well as filling in any optional parameters (if necessary), you can click on one of the three visualization and editing buttons:
Clicking this button displays the tracking results for all time steps side by side. You can navigate through time steps using the scrollbar.
Each bacterium is represented as a 2D cylinder (line) in green by default. Each line is labeled with the bacterium's ID and its parent ID.
Double-clicking on a bacterium displays detailed information, including:
This button enables users to focus on two consecutive time steps to monitor bacterial tracking between them.
After clicking this button, a new window appears with the following inputs:
- Time Step 1: The time step where the source objects are present.
- Time Step 2: The time step where the target objects appear.
Additionally, you can focus on the tracking of specific bacteria by filling in the following options:
-
Bacteria Object Number(s) (comma-separated):
ObjectNumberof the bacteria to be considered. - Bacteria ID(s) (comma-separated): id of the bacteria to be considered.
- Bacteria Parent ID(s) (comma-separated): parent id of the bacteria to be considered.
- Neighbor Distance (unit: µm): The maximum distance (in micrometers) to identify bacterial neighbors. This option is useful when you select specific bacteria using one of the options mentioned above and, in addition, want to view the tracking of their neighbors. By default, the neighbors of bacteria are shown based on the Neighbor CSV file you imported earlier. However, you can set a maximum distance here if the Neighbor CSV file doesn't provide the specific tracking details you want to see.
- Visualization Modes: Users can choose between two visualization modes:
- Two Different Slides (Default): Displays bacteria in Time Step 1 and Time Step 2 in separate windows.
- Slide Show: Displays both time steps in one window, allowing navigation using the scrollbar.
After configuring these options, click the Show button to see the result of the visualization.
Double-clicking on a bacterium displays detailed information, including:
Clicking this button opens a window for modifying bacterial tracking by creating or removing links.
Inputs for Editing Tracking Information:
- Target Bacteria Time Step(s) (comma-separated):
A list of time steps for the target bacteria, separated by ,. Fill this field if you want to create or remove a link.
Target bacteria refers to the bacteria you want to create a link to or remove a link from.
Note: If all target bacteria are in the same time step, you don’t need to specify their time step for each one individually. If they are in different time steps, you must specify the time step of each bacterium, even if some are in the same time step.
- Target Bacteria ID(s) (comma-separated):
A list of target bacteria Ids, separated by ,. Fill this field if you want to create or remove a link.
- Source Bacteria Time Step(s) (comma-separated):
A list of time steps for the source bacteria, separated by ,.
Source bacteria refers to the bacteria from which you want to create a link to the target bacteria.
Note: If all source bacteria are in the same time step, you don’t need to specify their time step for each one individually. If they are in different time steps, you must specify the time step for each bacterium, even if some are in the same time step.
After filling in the required fields (if you only want to remove links, you only need to fill Target Bacteria Time Step(s) and Target Bacteria ID(s)), you can click on:
- Remove Links: To remove links from the target bacteria.
- Create Links: To create links from the source bacteria to the target bacteria
Once you have modified the links, you need to fill in the following inputs:
- Interval Time: Time interval between frames (in minutes)
- Elongation Rate Method: Choose the method to calculate elongation rate – Average or Linear Regression.
- Save Pickle (optional): Select this option if you want to save the results in
.pickleformat.
Finally, click on Save Refinement. The refined tracking results will be saved in the directory of the TrackRefiner Refined Tracking CSV File you specified earlier.