Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Fixed integer cell names
Browse files Browse the repository at this point in the history
  • Loading branch information
mvento committed Sep 9, 2019
1 parent c9b61a2 commit 33a59eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cellphonedb/src/core/methods/method_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def _counts_validations(counts: pd.DataFrame, meta: pd.DataFrame) -> pd.DataFram
counts = counts.astype(pd.np.float) # type: pd.DataFrame
except:
raise ParseCountsException
meta.index = meta.index.astype(str)
for cell in meta.index.values:
if cell not in counts.columns.values:
raise ParseCountsException('Some cells in meta didnt exist in counts columns',
Expand Down
1 change: 1 addition & 0 deletions cellphonedb/src/core/preprocessors/method_preprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def meta_preprocessor(meta_raw: pd.DataFrame) -> pd.DataFrame:
meta = pd.DataFrame(data={'cell_type': meta_raw.iloc[:, 1]})
meta.set_index(meta_raw.iloc[:, 0], inplace=True)
meta.index.name = 'cell'
meta.index = meta.index.astype(str)
return meta

except:
Expand Down

0 comments on commit 33a59eb

Please sign in to comment.