Skip to content

Commit

Permalink
fix(clump): read input files recursively (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
ireneisdoomed authored Dec 1, 2023
1 parent 793a58b commit a6cc21d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/otg/clump.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def __post_init__(self: ClumpStep) -> None:
Raises:
ValueError: If study index and LD index paths are not provided for study locus.
"""
input_cols = self.session.spark.read.parquet(self.input_path).columns
input_cols = self.session.spark.read.parquet(
self.input_path, recursiveFileLookup=True
).columns
if "studyLocusId" in input_cols:
if self.study_index_path is None or self.ld_index_path is None:
raise ValueError(
Expand All @@ -59,7 +61,9 @@ def __post_init__(self: ClumpStep) -> None:
study_index=study_index, ld_index=ld_index
).clump()
else:
sumstats = SummaryStatistics.from_parquet(self.session, self.input_path)
sumstats = SummaryStatistics.from_parquet(
self.session, self.input_path, recursiveFileLookup=True
)
clumped_study_locus = sumstats.window_based_clumping(
locus_collect_distance=self.locus_collect_distance
)
Expand Down

0 comments on commit a6cc21d

Please sign in to comment.