Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(l2g): remove custom session params + other fixes #841

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions src/gentropy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,7 @@ 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",
}
}
)
session: Any = field(default_factory=lambda: {"extended_spark_conf": None})
run_mode: str = MISSING
predictions_path: str = MISSING
credible_set_path: str = MISSING
Expand Down Expand Up @@ -313,12 +304,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",
Expand Down
4 changes: 2 additions & 2 deletions src/gentropy/l2g.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
Loading