Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/opentargets/gentropy into xg…
Browse files Browse the repository at this point in the history
…1_l2g_intervals
  • Loading branch information
xyg123 committed Dec 16, 2024
2 parents 4f893fb + 4820e65 commit 2bbf69c
Show file tree
Hide file tree
Showing 8 changed files with 1,520 additions and 1,652 deletions.
12 changes: 0 additions & 12 deletions docs/python_api/common/version_engine.md

This file was deleted.

2,727 changes: 1,433 additions & 1,294 deletions poetry.lock

Large diffs are not rendered by default.

81 changes: 40 additions & 41 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,64 +19,63 @@ packages = [{ include = "gentropy", from = "src" }]
gentropy = "gentropy.cli:main"

[tool.poetry.dependencies]
python = "^3.10, <3.11"
python = ">=3.10, <3.11"
pyspark = "3.3.4"
scipy = "^1.11.4"
hydra-core = "^1.3.2"
pyliftover = "^0.4"
numpy = "^1.26.2"
scipy = ">=1.11.4, <1.12.0"
hydra-core = ">=1.3.2, <1.4.0"
pyliftover = ">=0.4, <0.5"
numpy = ">=1.26.2, <1.27.0"
hail = "0.2.127"
wandb = ">=0.16.2,<0.19.0"
google = "^3.0.0"
omegaconf = "^2.3.0"
typing-extensions = "^4.9.0"
scikit-learn = "^1.3.2"
pandas = { extras = ["gcp", "parquet"], version = "^2.2.2" }
skops = ">=0.9,<0.11"
google-cloud-secret-manager = "^2.20.0"
shap = "^0.46.0"
matplotlib = "3.7.3"

[tool.poetry.dev-dependencies]
pre-commit = "^4.0.0"
mypy = "^1.13"
pep8-naming = "^0.14.1"
interrogate = "^1.7.0"
isort = "^5.13.2"
darglint = "^1.8.1"
ruff = "^0.8.1"
wandb = ">=0.19.0, <0.20.0"
google = ">=3.0.0, <3.1.0"
omegaconf = ">=2.3.0, <2.4.0"
typing-extensions = ">=4.9.0, <4.13.0"
scikit-learn = ">=1.6.0, <1.7.0"
pandas = { extras = ["gcp", "parquet"], version = ">=2.2.2, <2.3.0" }
skops = ">=0.11, <0.12"
google-cloud-secret-manager = ">=2.20.0, <2.22.0"
shap = ">=0.46.0, <0.47.0"
matplotlib = ">=3.7.3, <3.8.0"


[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5.3"
mkdocstrings-python = "^1.8.0"
mkdocs = ">=1.5.3, <1.6.0"
mkdocstrings-python = ">=1.12.2, <1.13.0"
mkdocs-material = "*"
mkdocs-section-index = "^0.3.4"
mkdocs-git-revision-date-localized-plugin = "^1.2.2"
mkdocs-autolinks-plugin = "^0.7.1"
mkdocs-awesome-pages-plugin = "^2.9.2"
mkdocs-exclude = "^1.0.2"
mkdocs-git-committers-plugin-2 = "^2.2.3"
lxml = "^5.1.0"
pymdown-extensions = "^10.7"
mkdocs-section-index = ">=0.3.4, <0.4.0"
mkdocs-git-revision-date-localized-plugin = ">=1.2.2, <1.4.0"
mkdocs-autolinks-plugin = ">=0.7.1, <0.8.0"
mkdocs-awesome-pages-plugin = ">=2.9.2, <3.0.0"
mkdocs-exclude = ">=1.0.2, <1.1.0"
mkdocs-git-committers-plugin-2 = ">=2.2.3, <2.5.0"
lxml = ">=5.1.0, <5.4.0"
pymdown-extensions = ">=10.7, <10.13"


[tool.poetry.group.tests.dependencies]
pytest-cov = ">=4.1,<7.0"
pytest-sugar = ">=0.9.5,<1.1.0"
dbldatagen = ">=0.3.1,<0.5.0"
pyparsing = "^3.1.1"
pyparsing = ">=3.1.1, <3.3.0"
pytest = ">=7.4.4,<9.0.0"
pytest-xdist = "^3.5.0"
pytest-xdist = ">=3.5.0, <3.7.0"


[tool.poetry.group.dev.dependencies]
ipython = "^8.19.0"
ipykernel = "^6.28.0"
google-cloud-dataproc = "^5.8.0"
ipython = ">=8.19.0, <8.31.0"
ipykernel = ">=6.28.0, <6.30.0"
google-cloud-dataproc = ">=5.8.0, <5.16.0"
pydoclint = ">=0.3.8,<0.6.0"
prettier = "^0.0.7"
prettier = ">=0.0.7, <0.1.0"
deptry = ">=0.12,<0.21"
yamllint = "^1.33.0"
yamllint = ">=1.33.0, <1.36.0"
pre-commit = ">=4.0.0, <4.1.0"
mypy = ">=1.13, <1.14"
pep8-naming = ">=0.14.1, <0.15.0"
interrogate = ">=1.7.0, <1.8.0"
isort = ">=5.13.2, <5.14.0"
darglint = ">=1.8.1, <1.9.0"
ruff = ">=0.8.1, <0.9.0"

[tool.semantic_release]
logging_use_named_masks = true
Expand Down
158 changes: 0 additions & 158 deletions src/gentropy/common/version_engine.py

This file was deleted.

30 changes: 18 additions & 12 deletions src/gentropy/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class SessionConfig:
write_mode: str = "errorifexists"
spark_uri: str = "local[*]"
hail_home: str = os.path.dirname(hail_location)
extended_spark_conf: dict[str, str] | None = field(default_factory=dict[str, str])
extended_spark_conf: dict[str, str] | None = field(
default_factory=dict[str, str])
output_partitions: int = 200
_target_: str = "gentropy.common.session.Session"

Expand All @@ -39,7 +40,8 @@ class ColocalisationConfig(StepConfig):
credible_set_path: str = MISSING
coloc_path: str = MISSING
colocalisation_method: str = MISSING
colocalisation_method_params: dict[str, Any] = field(default_factory=dict[str, Any])
colocalisation_method_params: dict[str, Any] = field(
default_factory=dict[str, Any])
_target_: str = "gentropy.colocalisation.ColocalisationStep"


Expand Down Expand Up @@ -124,7 +126,8 @@ class EqtlCatalogueConfig(StepConfig):
eqtl_catalogue_paths_imported: str = MISSING
eqtl_catalogue_study_index_out: str = MISSING
eqtl_catalogue_credible_sets_out: str = MISSING
mqtl_quantification_methods_blacklist: list[str] = field(default_factory=lambda: [])
mqtl_quantification_methods_blacklist: list[str] = field(
default_factory=lambda: [])
eqtl_lead_pvalue_threshold: float = 1e-3
_target_: str = "gentropy.eqtl_catalogue.EqtlCatalogueStep"

Expand All @@ -146,7 +149,8 @@ class FinngenStudiesConfig(StepConfig):
)
finngen_summary_stats_url_suffix: str = ".gz"
efo_curation_mapping_url: str = "https://raw.githubusercontent.com/opentargets/curation/24.09.1/mappings/disease/manual_string.tsv"
sample_size: int = 453733 # https://www.finngen.fi/en/access_results#:~:text=Total%20sample%20size%3A%C2%A0453%2C733%C2%A0(254%2C618%C2%A0females%20and%C2%A0199%2C115%20males)
# https://www.finngen.fi/en/access_results#:~:text=Total%20sample%20size%3A%C2%A0453%2C733%C2%A0(254%2C618%C2%A0females%20and%C2%A0199%2C115%20males)
sample_size: int = 453733
_target_: str = "gentropy.finngen_studies.FinnGenStudiesStep"


Expand Down Expand Up @@ -199,7 +203,6 @@ class LDIndexConfig(StepConfig):
"nfe", # Non-Finnish European
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.gnomad_ingestion.LDIndexStep"


Expand Down Expand Up @@ -416,7 +419,6 @@ class GnomadVariantConfig(StepConfig):
"remaining", # Other
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.gnomad_ingestion.GnomadVariantIndexStep"


Expand All @@ -439,7 +441,6 @@ class PanUKBBConfig(StepConfig):
"EUR", # European
]
)
use_version_from_input: bool = False
_target_: str = "gentropy.pan_ukb_ingestion.PanUKBBVariantIndexStep"


Expand Down Expand Up @@ -687,7 +688,8 @@ class Config:
"""Application configuration."""

# this is unfortunately verbose due to @dataclass limitations
defaults: List[Any] = field(default_factory=lambda: ["_self_", {"step": MISSING}])
defaults: List[Any] = field(default_factory=lambda: [
"_self_", {"step": MISSING}])
step: StepConfig = MISSING
datasets: dict[str, str] = field(default_factory=dict)

Expand Down Expand Up @@ -721,7 +723,8 @@ def register_config() -> None:
name="gwas_catalog_top_hit_ingestion",
node=GWASCatalogTopHitIngestionConfig,
)
cs.store(group="step", name="ld_based_clumping", node=LDBasedClumpingConfig)
cs.store(group="step", name="ld_based_clumping",
node=LDBasedClumpingConfig)
cs.store(group="step", name="ld_index", node=LDIndexConfig)
cs.store(group="step", name="locus_to_gene", node=LocusToGeneConfig)
cs.store(
Expand All @@ -739,7 +742,8 @@ def register_config() -> None:

cs.store(group="step", name="pics", node=PICSConfig)
cs.store(group="step", name="gnomad_variants", node=GnomadVariantConfig)
cs.store(group="step", name="ukb_ppp_eur_sumstat_preprocess", node=UkbPppEurConfig)
cs.store(group="step", name="ukb_ppp_eur_sumstat_preprocess",
node=UkbPppEurConfig)
cs.store(group="step", name="variant_index", node=VariantIndexConfig)
cs.store(group="step", name="variant_to_vcf", node=ConvertToVcfStepConfig)
cs.store(
Expand Down Expand Up @@ -772,5 +776,7 @@ def register_config() -> None:
name="locus_to_gene_associations",
node=LocusToGeneAssociationsStepConfig,
)
cs.store(group="step", name="finngen_ukb_meta_ingestion", node=FinngenUkbMetaConfig)
cs.store(group="step", name="credible_set_qc", node=CredibleSetQCStepConfig)
cs.store(group="step", name="finngen_ukb_meta_ingestion",
node=FinngenUkbMetaConfig)
cs.store(group="step", name="credible_set_qc",
node=CredibleSetQCStepConfig)
Loading

0 comments on commit 2bbf69c

Please sign in to comment.