if not perform:
    sys.exit(
        "Config file set to perform=False, not performing {}".format(__file__))

# Forced overwrite can be achieved in one of two ways.
# The command line overrides the config file, check here if it is provided
if not force:
    force = args.force

barcode_foci_cols = id_cols + location_cols + spot_parent_cols
all_foci_cols = list(
    set(id_cols + location_cols + foci_cols + spot_score_cols + barcode_cols +
        gene_cols))

cell_quality = CellQuality(quality_func,
                           category_class_name=quality_col,
                           category_col_index=quality_idx)
cell_category_dict = cell_quality.define_cell_quality()
cell_category_df = pd.DataFrame(cell_category_dict, index=[quality_col])

sites = [
    x.name for x in input_platedir.iterdir() if x.name not in ignore_files
]
num_sites = len(sites)

image_list = []
for site in sites:
    print(f"Now processing spots for {site}...")

    # Load image metadata per site
    try:
cell_config = config["options"]["preprocess"]["process-cells"]
cell_sort_col = cell_config["sort_col"]
merge_info = cell_config["merge_columns"]
foci_site_col = cell_config["foci_site_col"]
force = cell_config["force_overwrite"]
metadata_merge_foci_cols = cell_config["metadata_merge_columns"]["foci_cols"]
metadata_merge_cell_cols = cell_config["metadata_merge_columns"]["cell_cols"]

# Forced overwrite can be achieved in one of two ways.
# The command line overrides the config file, check here if it is provided
if not force:
    force = args.force

cell_quality = CellQuality(quality_func,
                           category_class_name=quality_col,
                           category_col_index=quality_idx)
cell_category_dict = cell_quality.define_cell_quality()
empty_cell_category = len(cell_category_dict) + 1
cell_category_dict[empty_cell_category] = "Empty"
cell_category_df = pd.DataFrame(cell_category_dict,
                                index=[quality_col]).transpose()

# Enables feature filtering by loading the Cell Painting feature file.
# 0.prefilter-features.py must be run first
try:
    all_feature_df = pd.read_csv(prefilter_file,
                                 sep="\t").query("not prefilter_column")
except FileNotFoundError:
    raise FileNotFoundError(
        "Error",