megafish.seqif module

TCEP_subtraction(zarr_path, group, footer='_sub')[source]

Subtracts consecutive cycles in the image data, assuming cycles are organized as TCEP and non-TCEP pairs. This process highlights the differences between the cycles and removes background noise.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • group (str) – Group name in the Zarr file where the image data is stored.

  • footer (str, optional) – Footer string to append to the output Zarr group name; defaults to “_sub”.

Returns:

This function saves the result of the TCEP subtraction in a new Zarr group.

Return type:

None

skip_odd_cycle(zarr_path, group, footer='_skc')[source]

Selects and retains only the even cycles in the dataset, removing all odd cycles.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • group (str) – Group name in the Zarr file where the image data is stored.

  • footer (str, optional) – Footer string to append to the output Zarr group name; defaults to “_skc”.

Returns:

This function saves the dataset with only even cycles in a new Zarr group.

Return type:

None

get_intensity(zarr_path, group_int, group_lbl, footer='_int')[source]

Calculates the mean intensity of labeled segments in an image dataset and saves the results as a CSV file.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • group_int (str) – Group name in the Zarr file for the intensity data.

  • group_lbl (str) – Group name in the Zarr file for the label data.

  • footer (str, optional) – Footer string to append to the output CSV file and group name; defaults to “_int”.

Returns:

This function saves the computed intensities and segment information as a CSV file.

Return type:

None

intnensity_summary(zarr_path, groups, group_seg, group_out, channels, genename_path=None, skip_odd=True)[source]

Summarizes intensity data for multiple groups and saves the results as a CSV file. Merges intensity values across cycles, segments, and channels, and optionally associates the results with gene names.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • groups (list) – List of group names in the Zarr file for intensity data.

  • group_seg (str) – Group name in the Zarr file for segmentation data.

  • group_out (str) – Output group name for the summary CSV file.

  • channels (list) – List of channel numbers corresponding to each group.

  • genename_path (str, optional) – Path to a CSV file containing gene names per channel.

  • skip_odd (bool, optional) – If True, odd cycles will be skipped when using gene names; defaults to True.

Returns:

This function saves the summarized intensity data as a CSV file.

Return type:

None