-
Notifications
You must be signed in to change notification settings - Fork 627
Issues with ingest #1128
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
Comments
Hi, @andrea-tango
About the first, yes, ingest needs vars in the same order. The ordering thing you describe is definitely not the issue with ingest. |
Hi @Koncopd, Thank you for the suggestions.
Best, |
Andrea, I think you'll want something more like: shared_genes = adata1.var_names.intersection(adata2.var_names)
adata1 = adata1[:, shared_genes].copy()
adata2 = adata2[:, shared_genes].copy() Your code only sorts the index of the var dataframe, but doesn't actually reorder the anndata object. It's definitely a little confusing that this is possible. |
But really, sometimes, this check for equality of var_names between reference and query is unnecessary, for example when you have embeddings being built in some way on both reference and query, you really don't need var_names to be equal, if you have found neighbors based on these embeddings. Is it possible to keep the check only when it is really essential? |
Hi all,
I am trying to use
ingest
to integrate different datasets.I found a couple of issues.
ingest
requires that thevar_names
are the same in the reference and the new object. I can select the intersection between the datasets; however, it requires that the genes are in the same orderif not ref_var_names.equals(new_var_names)
. I think thisif
could be modified usingset
(e.g.,len(set(ref_var_names).difference(set(new_var_names))) == 0
). I tried to order the.var
dataframe, but the.X
remains the same. In such a way, the expression of the genes does not correspond to the correct one. I can generate a dataframe and recreate the.X
, but it could be very nice that the.X
will be modified according to.var
or.obs
modifications (i.e., ordering).although it is possible to set
embedding_method=umap
,ingest
requires the PCA components. I used autoencoders instead of PCA, and I cannot runingest
only considering the UMAP. Can you fix it?Thank you in advance.
Best,
Andrea
The text was updated successfully, but these errors were encountered: