ark-analysis
ark-analysis copied to clipboard
Mantis viewer export with img_sub_folder = None does not work
Describe the bug
plot_utils.create_mantis_dir(
fovs=subset_pixel_fovs,
mantis_project_path=os.path.join(base_dir, pixel_output_dir, "mantis"),
img_data_path=tiff_dir,
mask_output_dir=os.path.join(base_dir, pixel_output_dir, "pixel_masks"),
mapping = os.path.join(base_dir, pixel_meta_cluster_remap_name),
seg_dir=pixie_seg_dir,
mask_suffix="_pixel_mask",
seg_suffix_name=seg_suffix,
img_sub_folder=None
)
The function plot_utils.create_mantis_dir fails when img_sub_folder = None because it can't os.path.join with it then. I think in the function this needs to be added, as img_sub_folder=None is explicitly allowed in the rest of the notebook.
Thanks!
Hi @FaehlingT, we have a line of code within the function that handles None input by changing it into an empty string in order to work with os.path.join().
It was added to the repo in PR #1050 on 8/28, so please check you've updated your local version of ark-analysis and try to run the function again.