You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I come across this issue many times when I have two Anndata objects A and B and I want to change B to have the same vars as A by keeping the shared genes and inflating the new genes that are in A but not in B with a default value (e.g. zeros). I searched the API but did not find a function to do this.
Now I do something like the following to achieve this:
It would be good to support it natively as I assume this is a very common use case (for example you train a model e.g. a simple PCA on A and you want to project/transform the B using that model).
So I imagine something like this:
adata_test.adapt_vars(adata_train, fill_value=0)
The text was updated successfully, but these errors were encountered:
Hmmm @mojtababahrami this is an interesting idea...I will need to think about it a bit. My initial reaction is that should be fairly straightforward but there may be some rough edges. Thanks for the issue!
I come across this issue many times when I have two Anndata objects A and B and I want to change B to have the same vars as A by keeping the shared genes and inflating the new genes that are in A but not in B with a default value (e.g. zeros). I searched the API but did not find a function to do this.
Now I do something like the following to achieve this:
It would be good to support it natively as I assume this is a very common use case (for example you train a model e.g. a simple PCA on A and you want to project/transform the B using that model).
So I imagine something like this:
The text was updated successfully, but these errors were encountered: