Contents

get_path

This module consists of a number of helper functions used to collection of functions to return path for settings, logfile, and data.

microscope_automation.util.get_path.add_suffix(file_path, suffix)[source]

Add suffix to end of file name.

Input:

file_path: path to file name

suffix: suffix to put between end of filename and file extension

Output:

new_file_path: file_path with suffix

microscope_automation.util.get_path.get_valid_path_from_prefs(prefs, key, search_dir=True, validate=False)[source]

Read list of paths from prefs and return first valid match.

Input:

prefs: Preferences object created from YAML file

key: key for pathlist in preferences.yml

search_dir: if True search for directory, otherwise for file

Output:

return_path: path to valid file or directory

microscope_automation.util.get_path.set_up_subfolders(parent_folder_path, subfolder)[source]

Set the Subfolders for imaging folder - e.g. TapeOnly and Failed QC

Input:

parent_folder_path: Image Folder Path

subfolder: folder to create, can be list of multiple folders

Output:

subfolders: list of full path of subfolders created

microscope_automation.util.get_path.get_daily_folder(prefs, barcode=None)[source]

Find folder for daily settings and results. Create folder if not existing.

Input:

prefs: Preferences object created from YAML file

barcode: Use the plate barcode to make the folder

Output:

daily_path: path to daily folder. No ‘/’ at end.

microscope_automation.util.get_path.get_position_csv_path(prefs, barcode=None)[source]

Function to get the file path for the csv files where all the positions are stored after segmentation.

Input:

prefs: preferences

barcode: Use the plate barcode to make the folder

Output:

paths: file paths for the files

microscope_automation.util.get_path.get_log_file_path(prefs)[source]

Return path to log file.

Input:

prefs: Preferences object created from YAML file

Output:

log_file_path: path to log file

microscope_automation.util.get_path.get_meta_data_path(prefs, barcode=None)[source]

Return path for meta data.

Input:

prefs: Preferences object created from YAML file

barcode: Use the plate barcode to make the folder

Output:

meta_data_file: path to log file

microscope_automation.util.get_path.get_experiment_path(prefs, dir=False)[source]

Return path to experiment.

Input:

prefs: Preferences object created from YAML file

dir: if true return path to experiments directory, otherwise to experiment file. Default: False

Output:

experiment_path: path to experiment

microscope_automation.util.get_path.get_recovery_settings_path(prefs)[source]

Returns the file path to save the pickled dictionary after interruption

Input:

prefs: Preferences object created from YAML file

Output:

file_path: path to recovery settings

microscope_automation.util.get_path.get_colony_dir_path(prefs, barcode=None)[source]

Return path to directory with .csv file with colony positions and features.

Input:

prefs: Preferences object created from YAML file

barcode: Use the plate barcode to make the folder

Output:

colonyDir: path to log file

microscope_automation.util.get_path.get_colony_remote_dir_path(prefs)[source]

Return path to directory with .csv file with colony positions and features on network.

Input:

prefs: Preferences object created from YAML file

Output:

colony_dir_path: path to log file

microscope_automation.util.get_path.get_colony_file_path(prefs, colony_file, barcode=None)[source]

Return path to file with colony information typically produced by CellProfiler based on Celigo platescanner data.

Input:

prefs: Preferences object created from YAML file

colony_file: path to .csv file with colony data

barcode: Use the plate barcode to make the folder

Output:

colony_file_path: complete path to colony file

microscope_automation.util.get_path.get_hardware_settings_path(prefs)[source]

Return path to .yml file with microscope specifications from preferences file.

Input:

prefs: Preferences object created from YAML file

Output:

hardwarePath: path to layout file

microscope_automation.util.get_path.get_references_path(prefs, barcode=None)[source]

Return path to directory for reference images. Create directory if not available

Input:

prefs: Preferences object created from YAML file

barcode: Use the plate barcode to make the folder

Output:

references_path: path to directory for reference images for specific well

microscope_automation.util.get_path.get_images_path(prefs, sub_dir=None, barcode=None)[source]

Return path to directory for images. Create directory if not available

Input:

prefs: Preferences object created from YAML file

sub_dir: Sub-directory for images. Will create folder with this name

barcode: Use the plate barcode to make the folder

Output:

references_path: path to directory for reference images for specific well

microscope_automation.util.get_path.get_calibration_path(prefs)[source]

Return path to calibration information e.g. blackreference images

Input:

prefs: Preferences object created from YAML file

Output:

calibration_path: path to calibration directory