Configration Module

Pipeline Configration

class exr.config.Config[source]

A class used to manage and represent the configuration for the ExR-Tools software.

This class handles the setup of paths, parameters, and project-specific settings. It also manages the creation of directory structures and file permissions as required. Configurations can be saved to or loaded from a JSON file for persistent use.

Methods:
  • set_config: Configures various parameters for the ExR-Tools.

  • save_config: Saves the current configuration to a JSON file.

  • load_config: Loads configuration from a JSON file.

  • create_directory_structure: Creates the necessary directory structure for the project.

  • set_permissions: Modifies file permissions for the project directory.

  • print: Outputs all current configuration attributes.

create_directory_structure()[source]

Creates the directory structure in the specified project path.

load_config(param_path)[source]

Saves the configuration to a .json file.

Parameters:
  • config_file_name (str) – Name of the configuration file.

  • param_path (str) –

Return type:

None

print()[source]

Prints all attributes of the Config object.

Return type:

None

save_config(config_file_name)[source]

Saves the configuration to a .json file.

Parameters:

config_file_name (str) – Name of the configuration file.

set_config(raw_data_path, processed_data_path=None, rounds=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], rois=None, spacing=[0.25, 0.1625, 0.1625], channel_names=['640', '561', '488'], ref_round=1, ref_channel='640', permission=False, create_directory_structure=True, config_file_name='exr_tools_config')[source]

Sets up the configuration parameters for running ExR-Tools.

Parameters:
  • raw_data_path (str) – The absolute path to the raw data directory. There is no default value, this must be provided.

  • processed_data_path (str) – The absolute path to the processed data directory. Default is a ‘processed_data’ subdirectory inside the raw_data_path.

  • rounds (List[int]) – List of the number of rounds in the ExR dataset. Default is list(range(10)).

  • rois (List[int]) – The number of region of interests. Default is None, in which case the regions of interest will be inferred from the raw data.

  • spacing (List[float]) – Spacing between pixels in the format [X,Y,Z]. Default is [0.1625,0.1625,0.250].

  • channel_names (List[str]) – Names of channels in the ND2 file. Default is [‘633’,’546’,’488’].

  • ref_round (int) – Reference round number. Default is 1.

  • ref_channel (str) – Reference channel name. Default is ‘633’.

  • permission (bool) – If set to True, changes permission of the raw_data_path to allow other users to read and write on the generated files. Default is None, in which case permissions will not be modified.

  • create_directroy_struc (bool) – If set to True, creates the directory structure in the specified project path. Default is None, in which case the directory structure will not be created.

  • config_file_name (str) – Name of the configuration file. Default is ‘exr_tools_config’.

  • create_directory_structure (bool | None) –

Return type:

None

set_permissions()[source]

Changes permission of the raw_data_path to allow other users to read and write on the generated files.