aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/partial_correlations.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-10 11:36:47 +0300
committerFrederick Muriuki Muriithi2023-07-10 11:36:47 +0300
commitc6ac30d4ccc26553a12e8c37cdf9078cbe9084b3 (patch)
treea40cea1c2b129e0e37b70d42c6f87fe51a5ec178 /gn3/computations/partial_correlations.py
parentedebea34ac6545909737ce9540e9d51858550873 (diff)
downloadgenenetwork3-migrate-to-python3.10.tar.gz
Fix linting errors caused by bump to Python 3.10migrate-to-python3.10
Diffstat (limited to 'gn3/computations/partial_correlations.py')
-rw-r--r--gn3/computations/partial_correlations.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 9f02ad2..192ad7f 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -421,9 +421,8 @@ def literature_correlation_by_list(
`web.webqtl.correlation.CorrelationPage.getLiteratureCorrelationByList`
function in GeneNetwork1.
"""
- if any((lambda t: (
- bool(t.get("tissue_corr")) and
- bool(t.get("tissue_p_value"))))(trait)
+ if any((bool(trait.get("tissue_corr")) and
+ bool(trait.get("tissue_p_value")))
for trait in trait_list):
temporary_table_name = f"LITERATURE{random_string(8)}"
query1 = (
@@ -491,7 +490,7 @@ def tissue_correlation_by_list(
"tissue_p_value": result["p-val"]
}
- if any((lambda t: bool(t.get("l_corr")))(trait) for trait in trait_list):
+ if any(bool((trait)) for trait in trait_list):
prim_trait_symbol_value_dict = fetch_gene_symbol_tissue_value_dict_for_trait(
(primary_trait_symbol,), tissue_probeset_freeze_id, conn)
if primary_trait_symbol.lower() in prim_trait_symbol_value_dict: