Skip to content

How to Run TrackRefiner

Atiyeh Ahmadi edited this page Jun 8, 2025 · 3 revisions

How to Run TrackRefiner

TrackRefiner can be executed in two different ways:

  • Command-Line Interface (CLI): trackrefiner-cli

You can see the input parameters of Trackrefiner by using the following command:

trackrefiner-cli -h
  • Graphical User Interface (GUI): trackrefiner-gui

Required and Optional Parameters

Below are the parameters used in both the CLI and GUI, along with their corresponding GUI field labels:

CellProfiler Output CSV File

  • CLI Parameter: -i, --cp_output_csv
  • GUI Label: CellProfiler Output CSV File

Path to the CellProfiler generated CSV file containing measured bacterial features (e.g., length, orientation) and tracking information.

Example: FilterObjects.csv

Segmentation Results Folder

  • CLI Parameter: -s, --segmentation_results
  • GUI Label: Segmentation Results Folder

Path to a folder containing .npy files generated from segmentation by CellProfiler.

Example: objects.zip

Neighbor CSV File

  • CLI Parameter: -n, --neighbor_csv
  • GUI Label: Neighbor CSV File

Path to the CSV file containing bacterial neighbor information.

Example: Object relationships.csv

Interval Time (minutes)

  • CLI Parameter: -t, --interval_time
  • GUI Label: Interval Time (minutes)

Time interval between frames, in minutes.

Doubling Time (minutes)

  • CLI Parameter: -d, --doubling_time
  • GUI Label: Doubling Time (minutes)

Minimum lifespan of bacteria, in minutes.

Elongation Rate Method (Optional)

  • CLI Parameter: -e, --elongation_rate_method
  • GUI Label: Elongation Rate Method

Options:

  • Average (default)
    • Calculates the average elongation rate of a bacterium over its lifecycle based on initial and final logarithm lengths
  • Linear Regression
    • Calculates the elongation rate of a bacterium using linear regression on the logarithm of length as a function of time

Method to calculate elongation rate

Pixel Per Micron (Optional)

  • CLI Parameter: -p, --pixel_per_micron
  • GUI Label: Pixel Per Micron

Conversion factor for pixels to micrometers. Default: 0.144.

Assign Cell Type (Optional)

  • CLI Parameter: -a, --assign_cell_type
  • GUI Label: Assign Cell Type

Enables or disables cell type assignment. Default: Enabled (checked).

Classifier (Optional)

  • CLI Parameter: -c, --classifier
  • GUI Label: Classifier

Options:

  • LogisticRegression (default)
  • C-Support Vector Classifier

Classifier for track refining

Number of CPUs (Optional)

  • CLI Parameter: -z, --num_cpus
  • GUI Label: Number of CPUs

Number of CPUs for parallel processing. Default: -1 (all available CPUs).

Boundary Limits (Optional)

  • CLI Parameter: -b, --boundary_limits
  • GUI Label: Boundary Limits

Define image boundaries to exclude objects outside the specified range. Format: Lower X, Upper X, Lower Y, Upper Y.

Example: 0,112,52,323 excludes objects outside X: 0–112 and Y: 52–323.

Dynamic Boundaries (Optional)

  • CLI Parameter: -dy, --dynamic_boundaries
  • GUI Label: Dynamic Boundaries

Specify a CSV file defining time-dependent boundary limits. Columns include:

  • Time Step
  • Lower X Limit
  • Upper X Limit
  • Lower Y Limit
  • Upper Y Limit

Example: dynamic_boundaries.csv

Disable Tracking Correction (Optional)

  • CLI Parameter: -dc, --disable_tracking_correction
  • GUI Label: Disable Tracking Correction

Disables tracking correction on CellProfiler outputs and focuses only on calculating bacterial features. Default: Disabled (unchecked).

Output Folder (Optional)

  • CLI Parameter: -o, --output
  • GUI Label: Output Folder

Folder to save results.

Default: Same folder as the CellProfiler output file.

Verbose Output (Optional)

  • CLI Parameter: -v, --verbose
  • GUI Label: Verbose Output

Enables detailed messages and warnings. Default: Disabled (unchecked).

Save results in .pickle format (Optional)

  • CLI Parameter: -k, --save_pickle
  • GUI Label: Save in .pickle format

This option is useful for facilitating further analysis, as described in our study, "A Pipeline for Calibrating Agent-Based Models of Microbial Populations: From Image Collection to Model Parameterization" where input data for the scripts used in this paper or some packages must be provided in .pickle format.