diff options
author | Frederick Muriuki Muriithi | 2022-11-22 12:25:13 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-11-22 12:25:13 +0300 |
commit | 5224b4b3f986f3f041e3a6f84615e41cf134c7f3 (patch) | |
tree | e8d324e946f55923e2e5bec38e206161240ab645 | |
parent | da60eb2ac79b1fc4ca66112204032bf0929cfef4 (diff) | |
parent | 60c4387aba515d0c7c6ec933901c33ac51486725 (diff) | |
download | genenetwork2-5224b4b3f986f3f041e3a6f84615e41cf134c7f3.tar.gz |
Merge branch 'bugfix/metadata-fetching' of github.com:Alexanderlacuna/genenetwork2 into Alexanderlacuna-bugfix/metadata-fetching
-rw-r--r-- | wqflask/wqflask/correlation/rust_correlation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index c57171c6..046acb17 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: @@ -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 |