From cc3f24011fe235cac1eb2e273a29a2ef531e0b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irene=20L=C3=B3pez?= Date: Mon, 14 Oct 2024 11:00:08 +0100 Subject: [PATCH 1/3] chore: delete l2g custom spark session --- src/gentropy/config.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/gentropy/config.py b/src/gentropy/config.py index 50eb4af72..0d11df46c 100644 --- a/src/gentropy/config.py +++ b/src/gentropy/config.py @@ -222,16 +222,6 @@ class LDBasedClumpingConfig(StepConfig): class LocusToGeneConfig(StepConfig): """Locus to gene step configuration.""" - session: Any = field( - default_factory=lambda: { - "extended_spark_conf": { - "spark.dynamicAllocation.enabled": "false", - "spark.driver.memory": "48g", - "spark.executor.memory": "48g", - "spark.sql.shuffle.partitions": "800", - } - } - ) run_mode: str = MISSING predictions_path: str = MISSING credible_set_path: str = MISSING From 2793f401f0939c1afe6cd91445cb2802a6f8b94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irene=20L=C3=B3pez?= Date: Mon, 14 Oct 2024 11:06:58 +0100 Subject: [PATCH 2/3] fix: add neighbourhood features in `LocusToGeneFeatureMatrixConfig` --- src/gentropy/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gentropy/config.py b/src/gentropy/config.py index 0d11df46c..5a1405c5f 100644 --- a/src/gentropy/config.py +++ b/src/gentropy/config.py @@ -303,12 +303,18 @@ class LocusToGeneFeatureMatrixConfig(StepConfig): "eQtlColocClppMaximum", "pQtlColocClppMaximum", "sQtlColocClppMaximum", - "tuQtlColocClppMaximum", # max H4 for each (study, locus, gene) aggregating over a specific qtl type "eQtlColocH4Maximum", "pQtlColocH4Maximum", "sQtlColocH4Maximum", - "tuQtlColocH4Maximum", + # max CLPP for each (study, locus, gene) aggregating over a specific qtl type and in relation with the mean in the vicinity + "eQtlColocClppMaximumNeighbourhood", + "pQtlColocClppMaximumNeighbourhood", + "sQtlColocClppMaximumNeighbourhood", + # max H4 for each (study, locus, gene) aggregating over a specific qtl type and in relation with the mean in the vicinity + "eQtlColocH4MaximumNeighbourhood", + "pQtlColocH4MaximumNeighbourhood", + "sQtlColocH4MaximumNeighbourhood", # distance to gene footprint "distanceSentinelFootprint", "distanceSentinelFootprintNeighbourhood", From 6f1f94d8a7f9a00819dfb08a4580e272cf8f91c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irene=20L=C3=B3pez?= Date: Mon, 14 Oct 2024 15:08:14 +0100 Subject: [PATCH 3/3] fix(feature_matrix): use right config for default values --- src/gentropy/config.py | 1 + src/gentropy/l2g.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gentropy/config.py b/src/gentropy/config.py index 5a1405c5f..848e8682a 100644 --- a/src/gentropy/config.py +++ b/src/gentropy/config.py @@ -222,6 +222,7 @@ class LDBasedClumpingConfig(StepConfig): class LocusToGeneConfig(StepConfig): """Locus to gene step configuration.""" + session: Any = field(default_factory=lambda: {"extended_spark_conf": None}) run_mode: str = MISSING predictions_path: str = MISSING credible_set_path: str = MISSING diff --git a/src/gentropy/l2g.py b/src/gentropy/l2g.py index 296aba3d2..8ff41d09b 100644 --- a/src/gentropy/l2g.py +++ b/src/gentropy/l2g.py @@ -10,7 +10,7 @@ from gentropy.common.session import Session from gentropy.common.utils import access_gcp_secret -from gentropy.config import LocusToGeneConfig +from gentropy.config import LocusToGeneConfig, LocusToGeneFeatureMatrixConfig from gentropy.dataset.colocalisation import Colocalisation from gentropy.dataset.gene_index import GeneIndex from gentropy.dataset.l2g_feature_matrix import L2GFeatureMatrix @@ -31,7 +31,7 @@ def __init__( self, session: Session, *, - features_list: list[str] = LocusToGeneConfig().features_list, + features_list: list[str] = LocusToGeneFeatureMatrixConfig().features_list, credible_set_path: str, variant_index_path: str | None = None, colocalisation_path: str | None = None,