Skip to content

Commit

Permalink
test: join based on variantId
Browse files Browse the repository at this point in the history
  • Loading branch information
xyg123 committed Feb 10, 2025
1 parent 5f9b417 commit 56c3c5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gentropy/dataset/l2g_features/intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def common_interval_feature_logic(
"""
study_loci_exploded = (
study_loci_to_annotate.df.withColumn("variantInLocus", f.explode_outer("locus"))
.select(
"studyLocusId",
f.col("variantInLocus.variantId").alias("variantId"),
f.col("variantInLocus.posteriorProbability").alias("posteriorProbability"),
)
# Filter for PP > 0.001
.filter(f.col("posteriorProbability") > 0.001)
.select("studyLocusId", "variantId", "posteriorProbability")
Expand Down

0 comments on commit 56c3c5c

Please sign in to comment.