From 4e51d42b85f315c5cd098fa84556e2f5f8d31104 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Thu, 13 Jul 2023 00:38:24 +0200 Subject: [PATCH] Patch for algae chloroplast. Require to come back on this patch Former-commit-id: 2ed9c6423fc92949cb3ef3f0293fef9fe2d581b6 Former-commit-id: cb3be1bfa89dd67c05dba49d2dd44f03016fe7d9 --- detectors/normalize/lib/selectIR.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/detectors/normalize/lib/selectIR.py b/detectors/normalize/lib/selectIR.py index a8f1424..52d1db7 100755 --- a/detectors/normalize/lib/selectIR.py +++ b/detectors/normalize/lib/selectIR.py @@ -46,12 +46,17 @@ for line in data: for p in range(begin,end): chr[p]+=direction - -maxSSC = float(max(abs(n) for n in chloro['SSC'])) -maxLSC = float(max(abs(n) for n in chloro['LSC'])) -chloro['SSC']=[n / maxSSC for n in chloro['SSC']] -chloro['LSC']=[n / maxLSC for n in chloro['LSC']] +# 07/13/2023 +# Hack for avoiding crash when LSC and SSC have no blast similarity +# Need to be reworked +if (len(chloro['SSC']) > 0) : + maxSSC = float(max(abs(n) for n in chloro['SSC'])) + chloro['SSC']=[n / maxSSC for n in chloro['SSC']] + +if (len(chloro['LSC']) > 0) : + maxLSC = float(max(abs(n) for n in chloro['LSC'])) + chloro['LSC']=[n / maxLSC for n in chloro['LSC']] scoreMax=0 len1Max=0