diff options
author | Frederick Muriuki Muriithi | 2022-09-09 08:16:39 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-09-09 08:16:39 +0300 |
commit | 7e7d31e842e3abfcc87729bfee12c8db25c565f1 (patch) | |
tree | 78bbb3c21d3500d4e4be4987e0e21ede7bccfba0 /wqflask/base/data_set.py | |
parent | f9ce0bc32db3bdd8a5947a18039c557c750f2957 (diff) | |
download | genenetwork2-7e7d31e842e3abfcc87729bfee12c8db25c565f1.tar.gz |
Filter out Samples without values
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r-- | wqflask/base/data_set.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 4d708e59..6c6deea9 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -749,8 +749,12 @@ class DataSet: (self.group.species,) ) results = dict(cursor.fetchall()) - sample_ids = [results.get(item) - for item in self.samplelist if item is not None] + sample_ids = [ + sample_id for sample_id in + (results.get(item) for item in self.samplelist + if item is not None) + if sample_id is not None + ] # MySQL limits the number of tables that can be used in a join to 61, # so we break the sample ids into smaller chunks |