Skip to content

Commit

Permalink
fix: do not impute isProteinCoding (opentargets#902)
Browse files Browse the repository at this point in the history
* fix: fix col names for imputation

* fix: fix v1

* fix: test
  • Loading branch information
addramir authored Nov 5, 2024
1 parent 2af1074 commit 6ec0d45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/gentropy/dataset/l2g_feature_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ def fill_na(
Returns:
L2GFeatureMatrix: L2G feature matrix dataset
"""
cols_to_impute = ["proteinGeneCount500kb", "geneCount500kb", "isProteinCoding"]
cols_to_impute = [
"proteinGeneCount500kb",
"geneCount500kb",
]
for col in cols_to_impute:
if col not in self._df.columns:
continue
Expand Down
2 changes: 1 addition & 1 deletion tests/gentropy/dataset/test_l2g_feature_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_fill_na(spark: SparkSession) -> None:
"geneId": "gene3",
"proteinGeneCount500kb": 3.5,
"geneCount500kb": 9.0,
"isProteinCoding": 1.0,
"isProteinCoding": 0.0,
"anotherFeature": 0.0,
},
],
Expand Down

0 comments on commit 6ec0d45

Please sign in to comment.