From 2b2b1be4d986eaeb0941693f4c5a14e178fb9f39 Mon Sep 17 00:00:00 2001 From: Philip Montgomery Date: Fri, 10 Jan 2025 16:01:10 -0500 Subject: [PATCH] hack to work around issue with duplicated cell_line_name --- portal-backend/loader/depmap_model_loader.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/portal-backend/loader/depmap_model_loader.py b/portal-backend/loader/depmap_model_loader.py index 46ad3b05..465c909d 100644 --- a/portal-backend/loader/depmap_model_loader.py +++ b/portal-backend/loader/depmap_model_loader.py @@ -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 @@ -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"])