Skip to content

Commit

Permalink
Fix duplicate column names when adding ensemble data
Browse files Browse the repository at this point in the history
  • Loading branch information
axdanbol committed Mar 7, 2024
1 parent 6509d85 commit f87be33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/util/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def add_ensemble_data(
index = matrix.var.index
keys = index.map(strip_version)
merged_var = matrix.var.merge(
ensemble, how="left", left_on=keys, right_on=_ENSEMBLE_COLUMN
ensemble,
how="left",
left_on=keys,
right_on=_ENSEMBLE_COLUMN,
suffixes=("_from_tool", None),
)
merged_var.index = index
merged_var[_GENE_COLUMN].fillna(index.to_series().map(create_gene_id), inplace=True)
Expand Down

0 comments on commit f87be33

Please sign in to comment.