trace_analyzer

Reliability status: development

Read a trace table and derive several different analysis, including the distribution of number barcodes per trace: total, duplicated, and non-duplicated. It also exports the Rg distribution.

Analyze chromatin trace files.

usage: trace_analyzer [-h] [-F ROOTFOLDER] [--input INPUT] [--plotXYZ]
                      [--pipe] [--format {png,svg}]

Named Arguments

-F, --rootFolder

Folder with images

Default: '.'

--input

Name of input trace file.

--plotXYZ

Plots XYZ traces for all ROIs

Default: False

--pipe

inputs Trace file list from stdin (pipe)

Default: False

--format

Possible choices: png, svg

Output image format (png or svg)

Default: 'png'

Description

A Python script for analyzing chromatin trace files. The script loads trace files and generates statistical analysis and visualizations of various properties:

  • Number of barcodes detected per trace

  • Number of duplicated barcodes

  • Distribution of localizations in X, Y, Z coordinates

  • Distances between consecutive neighboring barcodes

  • Visual representations of traces

  • Barcode detection efficiency analysis with bootstrapped error estimates

Usage

# Analyze a single trace file
trace_analyzer --input path/to/your/trace_file.ecsv

# Analyze multiple trace files using pipe
find /path/to/traces -name "*.ecsv" | trace_analyzer --pipe

# Specify a different root folder
trace_analyzer --rootFolder /custom/data/folder --input trace_file.ecsv

# Generate SVG output instead of PNG
trace_analyzer --input trace_file.ecsv --format svg

# Generate XYZ plots in addition to statistics
trace_analyzer --input trace_file.ecsv --plotXYZ

Output Files

For each trace file analyzed, the script generates:

  1. [tracefile]_trace_statistics.[format]: Histograms of barcode statistics

  2. [tracefile]_first_neighbor_distances.[format]: Histograms of distances between consecutive neighboring barcodes

  3. [tracefile]_barcode_detection.[format]: Plot of barcode detection efficiency

  4. [tracefile]_relative_barcode_frequencies: Barcode statistics file

  5. [tracefile]_traces_XYZ.[format]: Visual representation of the traces (if –plotXYZ is set)

Trace_3D_barcode_mask:DAPI_ROI:3_filtered_traces_XYZ_ROI3

Trace_3D_barcode_mask:DAPI_ROI:3_filtered_trace_statistics

Trace_3D_barcode_mask:DAPI_ROI:3_filtered_xyz_statistics