-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support change the selected ids to new category and add a new cluster to anndata.obs #99
Comments
kind of: def change_cluster(adata, old_cluster, new_category_ids, new_category_name=None, new_cluster_name=None):
adata.obs[new_cluster_name] = adata.obs[old_cluster]
adata.obs[new_cluster_name] = adata.obs[new_cluster_name].cat.add_categories(new_category_name)
adata.obs.loc[new_category_ids, new_cluster_name] = new_category_name
return adata |
Thank you for your quick reply. Annotating the cluster seems to change the category name for a whole cluster, what I want is changing some samples (selected ids) of one category or two categories to another new category. |
You can download the selected ids for each group and then add a new field in anndata.obs. Does this work?
|
Thank you, it works. If this feature can be added to the cirrocumulus? |
when I selected ids, I can
Download Selected IDs
, would it possiable I can change the category name of selected ids and update theclusters
to a new cluster name. The anndata should be updated and can be downloaded.The text was updated successfully, but these errors were encountered: