Skip to content

Commit

Permalink
Adding handling for different names of the cell name column
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwarchol committed Jun 8, 2023
1 parent 71daa6c commit 3156786
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minerva_analysis/server/models/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def load_csv(datasource_name, numpy=False):

if 'CellType' in df.columns:
df = df.rename(columns={'CellType': 'phenotype'})
if config[datasource_name]['featureData'][0]['celltype'] is not None:
df = df.rename(columns={config[datasource_name]['featureData'][0]['celltype']: 'phenotype'})

if np.issubdtype(df['phenotype'].dtype, np.number) is False:
df['phenotype'] = df['phenotype'].apply(lambda x: x.strip())

Expand Down

0 comments on commit 3156786

Please sign in to comment.