photon_mosaic.rules.suite2p_run#
Snakemake rule for running Suite2P.
Functions
|
Generate a dictionary of options for Suite2P by loading the default options and then modifying them with user-provided options. |
|
This function runs Suite2P on a given dataset folder and saves the results in the specified paths. |
- photon_mosaic.rules.suite2p_run.run_suite2p(stat_path, dataset_folder, user_ops_dict=None)[source]#
This function runs Suite2P on a given dataset folder and saves the results in the specified paths. It also handles any exceptions that may occur during the process and logs them in an error file.
- Parameters:
stat_path (str) – The path where the Suite2P statistics will be saved.
dataset_folder (Path) – The path to the folder containing the dataset.
user_ops_dict (dict, optional) – A dictionary containing user-provided options to override the default Suite2P options. The default is None.
- Returns:
The function runs Suite2P and saves results to the specified paths. If an error occurs, it logs the error to an error.txt file in the dataset folder.
- Return type:
None
- photon_mosaic.rules.suite2p_run.get_edited_options(input_path, save_folder, user_ops_dict=None)[source]#
Generate a dictionary of options for Suite2P by loading the default options and then modifying them with user-provided options.
The function also sets the required runtime paths for saving the results.
- Parameters:
input_path (Path) – The path to the input data folder.
save_folder (Path) – The path to the folder where the results will be saved.
user_ops_dict (dict, optional) – A dictionary containing user-provided options to override the default options. The default is None.
- Returns:
A dictionary containing the Suite2P options, including the user-provided options and the required runtime paths.
- Return type:
dict
- Raises:
ValueError – If a user-provided option is not valid for Suite2P.