Open gokceneraslan opened 3 years ago
More thoughts on this: https://github.com/theislab/anndata/issues/441#issuecomment-730882826
I've been thinking this could be a good part of a anndata.align(adatas: list[AnnData], *, dim: int, kind: Literal) -> list[AnnData]
function, for aligning a set of AnnData
s. Most of this could probably be stripped out of concat
.
Hey,
When I apply a classifier trained on dataset A to dataset B, the need for matching the genes of both arises. I guess this is equivalent to the
reindex
function in pandas.Given that
I think it'd be useful for the community to have this in AnnData.
Here, one can obviously train the classifier only with the genes shared by A and B, or concatenate+split them but imagine that you have classifier already trained with a set of genes, and you are making predictions for a new dataset, which clearly requires
reindex()
.Right now I am using the following idiotic function to do that
Here is how it looks like:
However this doesn't work when
axis=0
, e.g.which also links this issue to #526.