From 8bb89dd929506af37675ed5e65737ac79ca0678e Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 5 Sep 2023 14:41:41 +0300 Subject: Fix C3001: Lambda expression assigned to a variable Signed-off-by: Munyoki Kilyungi --- gn3/computations/partial_correlations.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gn3/computations') 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: -- cgit v1.2.3