Skip to content

Commit

Permalink
chore: update assign_study_locus_id docstring with updated output
Browse files Browse the repository at this point in the history
  • Loading branch information
vivienho committed Sep 24, 2024
1 parent bcae23d commit 8057a55
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/gentropy/dataset/study_locus.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,13 @@ def assign_study_locus_id(
Examples:
>>> df = spark.createDataFrame([("GCST000001", "1_1000_A_C", "SuSiE-inf"), ("GCST000002", "1_1000_A_C", "pics")]).toDF("studyId", "variantId", "finemappingMethod")
>>> df.withColumn("study_locus_id", StudyLocus.assign_study_locus_id(f.col("studyId"), f.col("variantId"), f.col("finemappingMethod"))).show()
+----------+----------+-----------------+-------------------+
| studyId| variantId|finemappingMethod| study_locus_id|
+----------+----------+-----------------+-------------------+
|GCST000001|1_1000_A_C| SuSiE-inf|3801266831619496075|
|GCST000002|1_1000_A_C| pics|1581844826999194430|
+----------+----------+-----------------+-------------------+
>>> df.withColumn("study_locus_id", StudyLocus.assign_study_locus_id(f.col("studyId"), f.col("variantId"), f.col("finemappingMethod"))).show(truncate=False)
++----------+----------+-----------------+--------------------------------+
+|studyId |variantId |finemappingMethod|study_locus_id |
++----------+----------+-----------------+--------------------------------+
+|GCST000001|1_1000_A_C|SuSiE-inf |109804fe1e20c94231a31bafd71b566e|
+|GCST000002|1_1000_A_C|pics |de310be4558e0482c9cc359c97d37773|
++----------+----------+-----------------+--------------------------------+
<BLANKLINE>
"""
if finemapping_col is None:
Expand Down

0 comments on commit 8057a55

Please sign in to comment.