Skip to content

Commit 3156786

Browse files
committed
Adding handling for different names of the cell name column
1 parent 71daa6c commit 3156786

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

minerva_analysis/server/models/data_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def load_csv(datasource_name, numpy=False):
142142

143143
if 'CellType' in df.columns:
144144
df = df.rename(columns={'CellType': 'phenotype'})
145+
if config[datasource_name]['featureData'][0]['celltype'] is not None:
146+
df = df.rename(columns={config[datasource_name]['featureData'][0]['celltype']: 'phenotype'})
147+
145148
if np.issubdtype(df['phenotype'].dtype, np.number) is False:
146149
df['phenotype'] = df['phenotype'].apply(lambda x: x.strip())
147150

0 commit comments

Comments
 (0)