From 0d3bb03f77c23b3a63789498a6f12abeb0dd58d4 Mon Sep 17 00:00:00 2001 From: pswain <peter.swain@ed.ac.uk> Date: Thu, 22 Feb 2024 16:56:18 +0000 Subject: [PATCH] fix(pipeline): baby.errors.BadOutput caught --- src/aliby/pipeline.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/aliby/pipeline.py b/src/aliby/pipeline.py index 24a19d7..ab287da 100644 --- a/src/aliby/pipeline.py +++ b/src/aliby/pipeline.py @@ -386,7 +386,11 @@ class Pipeline(ProcessABC): result = babyrunner.run_tp(i) except baby.errors.Clogging: self.log( - "WARNING:Clogging threshold exceeded in BABY." + "WARNING: Clogging threshold exceeded in BABY." + ) + except baby.errors.BadOutput: + self.log( + "WARNING: Bud has been assigned as its own mother." ) baby_writer.write( data=result, @@ -471,7 +475,8 @@ def check_earlystop(filename: str, es_parameters: dict, tile_size: int): ) # find tiles with cells covering too great a fraction of the tiles' area traps_above_athresh = ( - cells_used.groupby("trap").sum().apply(np.mean, axis=1) / tile_size**2 + cells_used.groupby("trap").sum().apply(np.mean, axis=1) + / tile_size**2 > es_parameters["thresh_trap_area"] ) return (traps_above_nthresh & traps_above_athresh).mean() -- GitLab