Skip to content

Commit

Permalink
fix_cli
Browse files Browse the repository at this point in the history
  • Loading branch information
tdefa committed Jun 10, 2024
1 parent 68ba5ee commit b025d28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion sopa/cli/patchify.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def comseg(
),
):
"""Prepare patches for transcript-based segmentation with ComSeg"""

from sopa._constants import SopaKeys, SopaFiles

from .utils import _default_boundary_dir

if comseg_temp_dir is None:
Expand Down Expand Up @@ -190,7 +192,7 @@ def _transcript_segmentation(

df_key = get_key(sdata, "points")
patches = Patches2D(sdata, df_key, patch_width_microns, patch_overlap_microns)
if filename==SopaKeys.COMSEG_BOUNDARIES:
if filename == SopaKeys.COMSEG_BOUNDARIES:
patches.patchify_centroids(temp_dir)
assert (
use_prior
Expand Down
8 changes: 5 additions & 3 deletions sopa/cli/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ast


import typer
from tqdm import tqdm

Expand Down Expand Up @@ -195,14 +194,17 @@ def comseg(
):
"""Perform ComSeg segmentation. This can be done on all patches directly, or on one individual patch."""
import json
import logging

from sopa._constants import SopaFiles, SopaKeys
from sopa.segmentation.methods import comseg_patch
import logging
log = logging.getLogger(__name__)

from pathlib import Path

from .utils import _default_boundary_dir

log = logging.getLogger(__name__)

config_name = SopaFiles.JSON_CONFIG_FILE

if patch_dir is None:
Expand Down

0 comments on commit b025d28

Please sign in to comment.