trace_splitter

Reliability status: development

Split chromatin traces using K-means clustering when their radius of gyration exceeds a threshold.

usage: trace_splitter [-h] [--input INPUT] [--output OUTPUT]
                      [--std_threshold STD_THRESHOLD]
                      [--num_clusters NUM_CLUSTERS] [--pipe]

Named Arguments

--input

Path to the input trace file.

--output

Path to save the modified trace file. Default: appends ‘_split’.

--std_threshold

Std deviation threshold for large traces (default: 1.0).

Default: 1.0

--num_clusters

Number of clusters for K-means (default: 2).

Default: 2

--pipe

inputs Trace file list from stdin (pipe)

Default: False

Example

trace_splitter --input original_traces.ecsv --std_threshold 1.5 --num_clusters 3

Given a chromatin trace table, this script:

  • Computes radius of gyration (Rg) for all traces.

  • Identifies traces with Rg larger than mean + N * std_dev.

  • Uses K-means to split these traces into num_clusters.

  • Saves the modified trace table with updated Trace_IDs.