diff --git a/src/gentropy/config.py b/src/gentropy/config.py index 127d90844..0a76b2c84 100644 --- a/src/gentropy/config.py +++ b/src/gentropy/config.py @@ -328,6 +328,24 @@ class WindowBasedClumpingStep(StepConfig): _target_: str = "gentropy.window_based_clumping.WindowBasedClumpingStep" +@dataclass +class FinemapperConfig(StepConfig): + """SuSiE fine-mapper step configuration.""" + + session: Any = field( + default_factory=lambda: { + "start_hail": True, + } + ) + study_locus_to_finemap: str = MISSING + study_locus_collected_path: str = MISSING + study_index_path: str = MISSING + output_path: str = MISSING + locus_radius: int = MISSING + locus_l: int = MISSING + _target_: str = "gentropy.susie_finemapping.SusieFineMapperStep" + + @dataclass class Config: """Application configuration.""" @@ -385,3 +403,4 @@ def register_config() -> None: cs.store(group="step", name="variant_index", node=VariantIndexConfig) cs.store(group="step", name="variant_to_gene", node=VariantToGeneConfig) cs.store(group="step", name="window_based_clumping", node=WindowBasedClumpingStep) + cs.store(group="step", name="susie_finemapping", node=FinemapperConfig) diff --git a/src/gentropy/susie_finemapper.py b/src/gentropy/susie_finemapper.py index 7b6f81b3a..5a0fa31f3 100644 --- a/src/gentropy/susie_finemapper.py +++ b/src/gentropy/susie_finemapper.py @@ -36,7 +36,7 @@ def __init__( study_index_path: str, output_path: str, locus_radius: int = 500_000, - locus_L: int = 10, + locus_l: int = 10, ) -> None: """Run fine-mapping on a studyLocusId from a collected studyLocus table. @@ -47,7 +47,7 @@ def __init__( study_index_path (str): path to the study index output_path (str): path to the output locus_radius (int): Radius of base-pair window around the locus, default is 500_000 - locus_L (int): Maximum number of causal variants in locus, default is 10 + locus_l (int): Maximum number of causal variants in locus, default is 10 """ # Read studyLocus study_locus = ( @@ -62,7 +62,7 @@ def __init__( study_locus, study_index, locus_radius * 2, - locus_L, + locus_l, ) # Write result result.df.write.mode(session.write_mode).parquet(