diff options
author | Munyoki Kilyungi | 2023-09-05 14:41:41 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-09-05 14:57:51 +0300 |
commit | 8bb89dd929506af37675ed5e65737ac79ca0678e (patch) | |
tree | 36c7bcdaefc62b33e1710d02d50df8f901c7c120 /gn3/computations | |
parent | bf8296c5c3093aef32a5cd91fb008ad257e7a2f1 (diff) | |
download | genenetwork3-8bb89dd929506af37675ed5e65737ac79ca0678e.tar.gz |
Fix C3001: Lambda expression assigned to a variable
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/computations')
-rw-r--r-- | gn3/computations/partial_correlations.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py index 9f02ad2..6eee299 100644 --- a/gn3/computations/partial_correlations.py +++ b/gn3/computations/partial_correlations.py @@ -421,9 +421,7 @@ 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 +489,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.get("l_corr")) 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: |