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(clump): read input files recursively #292

Merged
merged 2 commits into from
Dec 1, 2023
Merged
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
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