`X_pca_reference` versus `X_pca_harmony`
Closed this issue · 1 comments
maarten-devries commented
Hi,
Thanks again for the great package.
I have a conceptual question about the following scenario:
- I have an
adata_reference
which I have integrated withsp.pp.harmony_integrate()
, and thus it now has the.obsm['X_pca_harmony']
attribute. - Now I a map
adata_query
ontoadata_reference
usingsp.tl.map_embedding()
.
adata_query
now has both.obsm['X_pca_reference']
and.obsm['X_pca_harmony']
. - Now I want to concatenate
adata_reference
toadata_query
and plot them in integrated PCA space.
Question: foradata_query
, should I use theX_pca_reference
orX_pca_harmony
embedding for this?
I tried both and the results look quite similar, but which one is more correct?
serjisa commented
Hey! Sorry for the delay in replying.
X_pca_reference
slot is a non-corrected representation of query dataset in reference PCA space with reference PCA model. X_pca_harmony
is a corrected representation. Thus, if you want to plot uncorrected coordinates you should use adata_ref.obsm["X_pca"]
+adata_query.obsm["X_pca_reference"]
, and if you want to plot coordinates after correction you should use adata_ref.obsm["X_pca_harmony"]
+adata_query.obsm["X_pca_harmony"]