Skip to content

Commit

Permalink
test: fixing doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
DSuveges committed Apr 4, 2024
1 parent e91d03f commit ba50ed6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gentropy/datasource/gwas_catalog/associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def convert_gnomad_position_to_ensembl(
Examples:
>>> d = [(1, "A", "C"), (2, "AA", "C"), (3, "A", "AA")]
>>> df = spark.createDataFrame(d).toDF("position", "reference", "alternate")
>>> df.withColumn("new_position", convert_gnomad_position_to_ensembl(f.col("position"), f.col("reference"), f.col("alternate"))).show()
>>> df.withColumn("new_position", GWASCatalogCuratedAssociationsParser.convert_gnomad_position_to_ensembl(f.col("position"), f.col("reference"), f.col("alternate"))).show()
+--------+---------+---------+------------+
|position|reference|alternate|new_position|
+--------+---------+---------+------------+
Expand All @@ -61,7 +61,6 @@ def convert_gnomad_position_to_ensembl(
| 3| A| AA| 4|
+--------+---------+---------+------------+
<BLANKLINE>
"""
return f.when(
(f.length(reference) > 1) | (f.length(alternate) > 1), position + 1
Expand Down

0 comments on commit ba50ed6

Please sign in to comment.