From d61aa40d4deeae66e4327e948e68a20ebdd24094 Mon Sep 17 00:00:00 2001 From: adkinsrs Date: Wed, 14 Aug 2024 10:03:34 -0400 Subject: [PATCH] fixing bug with deduplicating ensembl IDs with nan --- www/api/resources/projectr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/api/resources/projectr.py b/www/api/resources/projectr.py index f02d13d4..970d550e 100644 --- a/www/api/resources/projectr.py +++ b/www/api/resources/projectr.py @@ -323,7 +323,7 @@ def projectr_callback(dataset_id, genecart_id, projection_id, session_id, scope, # If dataset genes have duplicated index names, we need to rename them to avoid errors # in collecting rownames in projectR (which gives invalid output) # This means these duplicated genes will not be in the intersection of the dataset and pattern genes - adata.var_names_make_unique() + adata = adata[:, adata.var.index.duplicated(keep="first") == False] num_target_genes = adata.shape[1] num_loading_genes = loading_df.shape[0]