trace_pearsons
Reliability status: stable
Compare multiple chromatin trace tables by computing pairwise distances between barcode combinations and quantifying similarity via Pearson correlation.These can be different fields of view of a single acquisition or different biological replicates.
This tool is useful for analyzing the structural similarity between different chromatin trace datasets, helping to identify patterns and relationships in chromatin organization across multiple samples or conditions.
The script calculates, for each tracefile, the median pairwise distance map. Then it calculates the bin-by-bin Pearson correlation between all tracefiles provided. The result is therefore a matrix of Pearson correlations.
usage: trace_pearsons [-h] (--input INPUT [INPUT ...] | --pipe) [-O OUTPUT]
[--vmin VMIN] [--vmax VMAX]
[--output_format {png,svg,pdf}] [--verbose]
Named Arguments
- --input
Paths to trace files to compare.
- --pipe
Read input filenames from stdin (pipe).
Default:
False- -O, --output
Output folder name for the correlation matrix plot (filename: trace_correlation_matrix.png)
Default:
'.'- --vmin
Minimum value for colormap scaling
Default:
-10- --vmax
Maximum value for colormap scaling
Default:
10- --output_format
Possible choices: png, svg, pdf
Output image format. Default = png.
Default:
'png'- --verbose
Increase verbosity
Default:
False
Output Files
The script generates:
trace_correlation_matrix.[format]: Pearson correlation matrix plot comparing all input trace tables.
trace_correlation_matrix.npy: NPY file containing the Pearson correlation matrix values.
Examples
$ ls *ecsv | trace_pearsons [options]
$ find . -name "*.ecsv" | trace_pearsons [options]
Notes
Input files must be in ECSV format compatible with ChromatinTraceTable
The script identifies unique parts of filenames to create readable labels in the plot
Correlation is calculated based on the spatial distances between barcode pairs