Analysis Module

Puncta Analysis

The Puncta Analysis Module is designed to analyze expansion microscopy data, specifically to identify puncta—distinct fluorescent markers that indicate proteins at synapses. It offers tools for processing synapses either individually or in pairs across multiple rounds of analysis. This module focuses on mapping synapse coordinates to detect the presence of proteins and to explore the interactions between proteins and synapses.

exr.analysis.analysis.extract_synapse_coordinates(config, roi)[source]

Extracts bounding cube coordinates from the synapses segmenation masks in a given Region of Interest (ROI) and saves them in a JSON file. segmentation_masks from <exr.segmentation.synapses_roi_segmentation> are reqiured.

Parameters:
  • config (Config) – Configuration options. This should be an instance of the Config class.

  • roi (int) – The ROI to analyze.

Return type:

None

exr.analysis.analysis.measure_synapse_properties(config, roi, round_channel_pairs, nonzero_threshold=0.65)[source]

Measures various properties of synapses for a given Region Of Interest (ROI) and round-channel pairs. The properties include volume, surface area, and aspect ratios of synapses. The function then saves the computed properties in a JSON file.

Parameters:
  • config (Config) – Configuration options. This should be an instance of the Config class.

  • roi (int) – The Region Of Interest (ROI) to measure properties for.

  • round_channel_pairs (List[Tuple[int, int]]) – List of tuples where each tuple is a (round, channel) pair.

  • nonzero_threshold (float, default is 0.65) – Threshold for the fraction of non-zero pixels to determine synapse validity.

Raises:

Logs an error message if there’s an issue during processing.

Return type:

None

exr.analysis.analysis.measure_synapse_properties_pairwise(config, roi, round_channel_pairs, nonzero_threshold=0.65)[source]

Computes pairwise statistics for synapse properties for a given Region Of Interest (ROI) based on the dataset configuration. The function operates on different rounds and channels, processing each pair to determine properties such as correlation, overlap, and distances between puncta. The results are then saved in a JSON file.

Parameters:
  • config (Config) – Configuration options. This should be an instance of the Config class.

  • roi (int) – The Region Of Interest (ROI) identifier for which the synapse properties are to be computed.

  • round_channel_pairs (List[Tuple[int, int]]) – List of tuples where each tuple contains a round number and a channel identifier. The function computes pairwise statistics for each combination of round-channel pairs.

  • nonzero_threshold (float) – Threshold for non-zero pixel fraction. Used to determine the validity of the synapse based on the amount of non-zero pixels in the image, default is 0.65.

Raises:

Logs an error message if there’s an issue during processing.

Return type:

None