trace_correct_coordinates

Reliability status: development

Correct z-offsets for chromatin traces.

This script corrects chromatin trace localization errors by adjusting the z-coordinate of barcodes to minimize their deviation from the center of mass (CoM) of their respective traces.

usage: trace_correct_coordinates [-h] --input INPUT [--output OUTPUT]
                                 [--max_iter MAX_ITER] [--tolerance TOLERANCE]

Named Arguments

--input

Path to the input trace file (ECSV format).

--output

Path to save the corrected trace file. Default: appends ‘_corrected’.

--max_iter

Maximum number of iterations (default: 10).

Default: 10

--tolerance

Convergence threshold for Z shifts (default: 0.01).

Default: 0.01

Example usage

trace_correct_coordinates --input traces.ecsv --output traces_corrected.ecsv --max_iter 10 --tolerance 0.01

Algorithm

  1. Compute the initial center of mass (CoM) for each chromatin trace.

  2. Iteratively adjust the z-coordinates of each barcode to minimize its distance to the CoM.

  3. Update the trace table and save the corrected version.