aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-05-14 18:37:09 +0000
committerzsloan2021-05-14 18:37:09 +0000
commit95c585eaba3101033143370f536e840228e114f0 (patch)
tree69a510066f0faa28b6d61503d7ef86506dacce61
parent1c2417fb3a8d8eb7087ab77a811aa790a9e2eb5b (diff)
downloadgenenetwork2-95c585eaba3101033143370f536e840228e114f0.tar.gz
Changed logic in SampleList to set num_cases_exists to False if all existing N are 1
-rw-r--r--wqflask/wqflask/show_trait/SampleList.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/show_trait/SampleList.py b/wqflask/wqflask/show_trait/SampleList.py
index f9d30dba..67768308 100644
--- a/wqflask/wqflask/show_trait/SampleList.py
+++ b/wqflask/wqflask/show_trait/SampleList.py
@@ -8,7 +8,6 @@ from pprint import pformat as pf
from utility import Plot
from utility import Bunch
-
class SampleList:
def __init__(self,
dataset,
@@ -92,8 +91,10 @@ class SampleList:
self.sample_list.append(sample)
self.se_exists = any(sample.variance for sample in self.sample_list)
- self.num_cases_exists = any(
- sample.num_cases for sample in self.sample_list)
+ self.num_cases_exists = False
+ if (any(sample.num_cases for sample in self.sample_list) and
+ any((sample.num_cases and sample.num_cases != "1") for sample in self.sample_list)):
+ self.num_cases_exists = True
first_attr_col = self.get_first_attr_col()
for sample in self.sample_list: