I use CellAssign to annotate cell types for a dataset, which are combined from multiple sources. I want to pass some Anndata.obs
columns to categorical_covariate_keys
, but it raise RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 1 but got size 2 for tensor number 1 in the list.
when training. However, pass some Anndata.obs
columns to batch_key
, will not raise any errors. And this error can be reproduced in the CellAssign turtorial’s jupyter notebook.
Therefore, does CellAssign support categorical_covariate_keys?
1 Like
Are you able to provide a reproducible example or more code and the full traceback?
@Ann-Holmes – there might be a bug, but can you try where you put one covariate in batch key and another in categorical coviarate keys?
Hi, @adamgayoso, I have tried the case you mentioned, CellAssign_bugs/cellassign_bug_reproduce2.ipynb at main · Ann-Holmes/CellAssign_bugs · GitHub.
The error is a little different compared to only categorical coviarate keys.
Ok we clearly have some sort of bug then, sorry about that. If you made an issue on our github and linked to this that would be super helpful. Thanks!
Ok, I’ll make an issue on scvi-tools repository. Thanks for your efforts with scRNA-seq tools.
This is fixed now on our main branch, but it could take a bit to see a release.
1 Like