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: repair SusieFinemapperStep to work with new SL schema and fix lo… #957

Merged
merged 5 commits into from
Dec 19, 2024
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
7 changes: 4 additions & 3 deletions src/gentropy/susie_finemapper.py
Daniel-Considine marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def susie_inf_to_studylocus( # noqa: C901
),
"variantId",
)
.sort(f.desc("posteriorProbability"))
.sort(f.desc(f.col("posteriorProbability").cast("double")))
.withColumn(
"locus",
f.collect_list(
Expand Down Expand Up @@ -896,8 +896,9 @@ def susie_finemapper_one_sl_row_gathered_boundaries( # noqa: C901
logging.warning("Analysis Flags check failed for this study")
return None

schema = StudyLocus.get_schema()
gwas_df = session.spark.createDataFrame([study_locus_row], schema=schema)
gwas_df = session.spark.createDataFrame(
[study_locus_row], StudyLocus.get_schema()
)
exploded_df = gwas_df.select(f.explode("locus").alias("locus"))

result_df = exploded_df.select(
Expand Down
Loading