From 90e8dd97233e2fa139454425b2427f8e5abca9e4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:03:30 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- merfishing/core/__init__.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/merfishing/core/__init__.py b/merfishing/core/__init__.py index 440159d..faecdbe 100644 --- a/merfishing/core/__init__.py +++ b/merfishing/core/__init__.py @@ -538,9 +538,11 @@ def plot_fov( # load gray image data fov_images = { - name: self.get_image_fov(name=name, fov=fov, projection="max", padding=padding, contrast=True) - if "+" not in name - else self.get_rgb_image(name, as_float=True, fov=fov, projection="max", padding=padding, contrast=True) + name: ( + self.get_image_fov(name=name, fov=fov, projection="max", padding=padding, contrast=True) + if "+" not in name + else self.get_rgb_image(name, as_float=True, fov=fov, projection="max", padding=padding, contrast=True) + ) for name in image_names } @@ -862,20 +864,20 @@ def cell_segmentation( temp_dir.mkdir(exist_ok=True) output_prefix_list = [] - + if debug is not None: try: debug = int(debug) except ValueError: print("Debug need to be None or an integer.") - transcript_df = pd.read_csv(f'{self.region_dir}/detected_transcripts.csv.gz') - fov_list = list(transcript_df['fov'].unique()) + transcript_df = pd.read_csv(f"{self.region_dir}/detected_transcripts.csv.gz") + fov_list = list(transcript_df["fov"].unique()) fov_list = fov_list[:debug] - #fov_list = self.fov_ids[:debug] + # fov_list = self.fov_ids[:debug] else: - transcript_df = pd.read_csv(f'{self.region_dir}/detected_transcripts.csv.gz') - fov_list = list(transcript_df['fov'].unique()) - #fov_list = self.fov_ids + transcript_df = pd.read_csv(f"{self.region_dir}/detected_transcripts.csv.gz") + fov_list = list(transcript_df["fov"].unique()) + # fov_list = self.fov_ids if gpu is False: with ProcessPoolExecutor(jobs) as executor: