angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
71 stars 25 forks source link

Make it easier if `segmentation_dir=None` in pixel clustering notebook #996

Closed cliu72 closed 1 year ago

cliu72 commented 1 year ago

Is your feature request related to a problem? Please describe. If segmentation_dir=None, we get this error whenever os.path.join(base_dir, segmentation_dir) is called, requiring the user to manually change all of these: image

Describe the solution you'd like Make it easier for the user to have segmentation_dir=None - either can add something like

if segmentation_dir is not None:
    segmentation_dir= os.path.join(base_dir, segmentation_dir)

right after seg_dir is defined, or move the os.path.join to inside the functions and add a check to make sure seg_dir is not None. Open to other suggestions as well.