Skip to content
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

Metrics fail when there are unused labels #379

Open
lazappi opened this issue Mar 1, 2023 · 1 comment
Open

Metrics fail when there are unused labels #379

lazappi opened this issue Mar 1, 2023 · 1 comment

Comments

@lazappi
Copy link
Member

lazappi commented Mar 1, 2023

Some of the metrics fail if adata.obs[label_key] is categorical and contains categories that aren't used. Can probably be fixed fairly easily by adding a adata.obs[label_key] = adata.obs[label_key].cat.remove_unused_categories(), changing how the present labels are calculated or doing something else to avoid this situation.

@florianingelfinger
Copy link

The same happens also if one of the labels is not present in one of the batches. Would be helpful to return a user error with description of the problem or subsetting as proposed by @lazappi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants