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

error when feature annotation is categorical #119

Open
ricoderks opened this issue Nov 24, 2021 · 2 comments
Open

error when feature annotation is categorical #119

ricoderks opened this issue Nov 24, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@ricoderks
Copy link
Collaborator

I noticed that anndata makes some vars categorical. This happens while saving the data to a h5ad file. This causes the following error while plotting the heatmap:

Warning: Error in <-: 'names' attribute [9] must be the same length as the vector [7]
  [No stack trace available]

It looks like that one of the categories is not going to be plotted. Decreasing the value for filtering the features (VMR) does create the heatmap.

@ergonyc
Copy link
Member

ergonyc commented Nov 25, 2021

The python backend is fairly aggressive on converting the annotation columns to categorial if possible. Probably need to force the type to numeric (or integer) if the number of levels is > than some small number.

Good zeroing in on the fact that the filtering might be reducing the total number of represented categories. I think that eventually we will want to create all the coloring (maps for categoricals, functions for numeric) and categorical as entries in the config table generated in ingest. That will provide safety for the filtering creating incomplete categories.

@ergonyc ergonyc added the bug Something isn't working label Nov 29, 2021
@ergonyc
Copy link
Member

ergonyc commented Dec 15, 2021

I think this is fixed but needs testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants