From 3073a26a612af1d6cba93c92474e75ec83553697 Mon Sep 17 00:00:00 2001 From: AlexanderKabui Date: Sun, 13 Nov 2022 21:40:25 +0300 Subject: add check for dataset type --- wqflask/wqflask/correlation/rust_correlation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index 935ab699..f5ee9403 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -23,7 +23,7 @@ from wqflask.correlation.exceptions import WrongCorrelationType def query_probes_metadata(dataset, trait_list): """query traits metadata in bulk for probeset""" - if not bool(trait_list): + if not bool(trait_list) or dataset.type!="ProbeSet": return [] with database_connector() as conn: -- cgit v1.2.3 From 60c4387aba515d0c7c6ec933901c33ac51486725 Mon Sep 17 00:00:00 2001 From: AlexanderKabui Date: Sun, 13 Nov 2022 23:54:56 +0300 Subject: add check when parsing floats --- wqflask/wqflask/correlation/rust_correlation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index f5ee9403..8decbd6c 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -70,11 +70,11 @@ def get_metadata(dataset, traits): "mean": mean, "description": description, "additive": additive, - "lrs_score": f"{lrs:3.1f}", + "lrs_score": f"{lrs:3.1f}" if lrs else "", "location": __location__(probe_chr, probe_mb), "chr": probe_chr, "mb": probe_mb, - "lrs_location": f"Chr{chr_score}: {mb:.6f}", + "lrs_location":f'Chr{chr_score}: {mb:{".6f" if mb else ""}}' "lrs_chr": chr_score, "lrs_mb": mb -- cgit v1.2.3