Skip to content

Commit

Permalink
Fix problem with new cell labels in extend workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Apr 8, 2024
1 parent 606ff29 commit 7616379
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/merge_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def to_Florent_case(s: str):

if args.base:
adata_transfer = adata_intersection[~adata_intersection.obs.index.isin(adata_base.obs.index)]

known_celltypes = adata_base.obs["cell_type"].unique()
adata_transfer.obs["cell_type"] = adata_transfer.obs["cell_type"].map(lambda x: x if x in known_celltypes else "Unknown")

adata_transfer.write_h5ad(args.output_transfer)

adata_intersection.write_h5ad(args.output_intersection)
Expand Down

0 comments on commit 7616379

Please sign in to comment.