Skip to content

Commit

Permalink
refactor: finalise StudyLocusOverlapStep
Browse files Browse the repository at this point in the history
  • Loading branch information
tskir committed Oct 26, 2023
1 parent 8643baa commit ca4d86a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
16 changes: 0 additions & 16 deletions src/otg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,22 +125,6 @@ class V2GStepConfig:
v2g_path: str = MISSING


@dataclass
class StudyLocusOverlapStepConfig:
"""StudyLocus overlaps index step requirements.
Attributes:
study_locus_path (str): Input study-locus path.
study_index_path (str): Input study index path to extract the type of study.
overlaps_index_out (str): Output overlaps index path.
"""

_target_: str = "otg.overlaps.OverlapsIndexStep"
study_locus_path: str = MISSING
study_index_path: str = MISSING
overlaps_index_out: str = MISSING


@dataclass
class UKBiobankStepConfig:
"""UKBiobank study table ingestion step requirements.
Expand Down
14 changes: 12 additions & 2 deletions src/otg/overlaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@

from dataclasses import dataclass

from omegaconf import MISSING

from otg.common.session import Session
from otg.config import StudyLocusOverlapStepConfig
from otg.dataset.study_index import StudyIndex
from otg.dataset.study_locus import StudyLocus
from otg.dataset.study_locus_overlap import StudyLocusOverlap


@dataclass
class OverlapsIndexStep(StudyLocusOverlapStepConfig):
class OverlapsIndexStep:
"""StudyLocus overlaps step.
This step generates a dataset of overlapping studyLocus associations.
Attributes:
study_locus_path (str): Input study-locus path.
study_index_path (str): Input study index path to extract the type of study.
overlaps_index_out (str): Output overlaps index path.
"""

session: Session = Session()

study_locus_path: str = MISSING
study_index_path: str = MISSING
overlaps_index_out: str = MISSING

def run(self: OverlapsIndexStep) -> None:
"""Run Overlaps index step.
Expand Down

0 comments on commit ca4d86a

Please sign in to comment.