From 4d9803388ff721cbb59d7332af0c0c7078112651 Mon Sep 17 00:00:00 2001 From: Jason Weirather Date: Thu, 18 Jul 2024 10:40:13 -0400 Subject: [PATCH] fix the case where there is no scoring data --- Dockerfile | 3 ++- pythologist/reader/formats/inform/frame.py | 9 +++++---- setup.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac0e251..c986af9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,8 @@ RUN pip3 install pandas \ && pip3 install scikit-image \ && pip3 install imagecodecs \ && pip3 install jsonschema \ - && pip3 install opencv-python-headless + && pip3 install opencv-python-headless \ + && pip3 install pythologist-test-images ARG user=jupyter_user ARG user_id=999 diff --git a/pythologist/reader/formats/inform/frame.py b/pythologist/reader/formats/inform/frame.py index c11958b..1abe3e2 100644 --- a/pythologist/reader/formats/inform/frame.py +++ b/pythologist/reader/formats/inform/frame.py @@ -369,10 +369,11 @@ def _read_data(self, # t_feature_definition.append([_v,'-',0]) # t_feature_basics.append([_v,'InForm threshold analysis']) - for i,r in _thresholds.iterrows(): - t_feature_definition.append([r['gate_label'],'+',1]) - t_feature_definition.append([r['gate_label'],'-',0]) - t_feature_basics.append([r['gate_label'],'InForm threshold analysis']) + if score_data_file is not None: + for i,r in _thresholds.iterrows(): + t_feature_definition.append([r['gate_label'],'+',1]) + t_feature_definition.append([r['gate_label'],'-',0]) + t_feature_basics.append([r['gate_label'],'InForm threshold analysis']) features = pd.DataFrame(me_feature_basics+t_feature_basics,columns=['feature_label','feature_description']) features.index.name = 'feature_index' diff --git a/setup.py b/setup.py index 75facd5..8b70262 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='pythologist', - version='2.1.0', + version='2.1.1', test_suite='nose2.collector.collector', description='inForm PerkinElmer Reader - Python interface to read outputs of the PerkinElmer inForm software;\ Pythologist-image-utilities: Functions to assist in working with image files;\