From 947fc494e057404ef71c2ffe4ab812f343e1e4ad Mon Sep 17 00:00:00 2001 From: tdefa Date: Wed, 5 Jun 2024 19:50:44 +0200 Subject: [PATCH] pre-commit test4 --- sopa/cli/patchify.py | 5 ++++- sopa/cli/segmentation.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sopa/cli/patchify.py b/sopa/cli/patchify.py index ffc1338d..a5f78f52 100644 --- a/sopa/cli/patchify.py +++ b/sopa/cli/patchify.py @@ -37,6 +37,7 @@ def image( _save_cache(sdata_path, SopaFiles.PATCHES_FILE_IMAGE, str(len(patches))) + @app_patchify.command() def baysor( sdata_path: str = typer.Argument(help=SDATA_HELPER), @@ -82,7 +83,7 @@ def baysor( config=config, cell_key=cell_key, unassigned_value=unassigned_value, - use_prior = use_prior, + use_prior=use_prior, ) @@ -130,6 +131,7 @@ def comseg( unassigned_value=unassigned_value, use_prior=True, ) + @app_patchify.command() def transcript_segmentation( sdata_path: str = typer.Argument(help=SDATA_HELPER), @@ -217,6 +219,7 @@ def transcript_segmentation( ) _save_cache(sdata_path, filename, "\n".join(map(str, valid_indices))) + def _save_cache(sdata_path: str, filename: str, content: str): from pathlib import Path diff --git a/sopa/cli/segmentation.py b/sopa/cli/segmentation.py index 0d79568c..21005462 100644 --- a/sopa/cli/segmentation.py +++ b/sopa/cli/segmentation.py @@ -197,12 +197,12 @@ def comseg( ): """Perform ComSeg segmentation. This can be done on all patches directly, or on one individual patch.""" import json + from sopa._constants import SopaFiles, SopaKeys from sopa.segmentation.methods import comseg_patch from .utils import _default_boundary_dir - config_name = SopaFiles.JSON_CONFIG_FILE if patch_dir is None: