Skip to content

Commit

Permalink
hack to work around issue with duplicated cell_line_name
Browse files Browse the repository at this point in the history
  • Loading branch information
pgm committed Jan 10, 2025
1 parent ba4ea17 commit 2b2b1be
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion portal-backend/loader/depmap_model_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ def _coerce_na(value):
return value


def temp_cell_line_name_fixup(model_id, cell_line_name):
if model_id == "ACH-000010":
log.warning(
"Nulling out cell line name from ACH-000010 because labeled as having the same name as ACH-000015. In the next release, we'll fix the dataset and then we can remove this hack"
)
cell_line_name = None

return cell_line_name


def insert_cell_lines(df):
"""
Is a separate method so this is testable
Expand All @@ -40,7 +50,7 @@ def insert_cell_lines(df):

cell_line = CellLine.get_by_depmap_id(model_id)

cell_line_name = row["CellLineName"]
cell_line_name = temp_cell_line_name_fixup(model_id, row["CellLineName"])
oncotree_primary_disease = row["OncotreePrimaryDisease"]
oncotree_subtype = row["OncotreeSubtype"]
oncotree_code = _coerce_na(row["OncotreeCode"])
Expand Down

0 comments on commit 2b2b1be

Please sign in to comment.