Skip to content
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

harmony or not #6

Open
Sirin24 opened this issue Sep 5, 2024 · 1 comment
Open

harmony or not #6

Sirin24 opened this issue Sep 5, 2024 · 1 comment

Comments

@Sirin24
Copy link

Sirin24 commented Sep 5, 2024

hello, I want to ask if i downloaded an annotated reference already batch corrected then annotated ( comes with counts only and the cell labels) and i will be using symphonypy, do I need to use harmony to batch correct it again? How does symphony work to annotate my data? does it cluster them ?

Another question i have. I may have made a mistake while following without_harmony notebook. Instead of

# Mapping UMAP coordinates
sp.tl.ingest(
    adata_query=adata_query,
    adata_ref=adata_ref,
    use_rep="X_pca_harmony",
)

# Labels prediction
sp.tl.transfer_labels_kNN(
    adata_query=adata_query,
    adata_ref=adata_ref,
    ref_labels=["celltype.l1"],
    ref_basis="X_pca",
    query_basis="X_pca_harmony",
)

I mistakenly skipped the use_rep in the ingest step. I wonder if this needs to be repeated. requesting resources on the server is not easy. That is why I ask.

# Mapping UMAP coordinates
sp.tl.ingest(adata_query=sample, adata_ref=adata)

# Labels prediction
sp.tl.transfer_labels_kNN(
  adata_query=sample,
  adata_ref=adata,
  ref_labels=["leiden", "cell_type_high_resolution"],
  ref_basis="X_pca",
  query_basis="X_pca_harmony",
)
@potulabe
Copy link
Owner

potulabe commented Sep 8, 2024

Hi @Sirin24 !

  1. No, you don't have to run harmony on the reference dataset if it's been already batch-corrected, just follow the instructions for Symphonypy without harmony tutorial. It should run clustering on your reference data.
  2. regarding use_rep... it's not clear to me which coordinates would be used for the ingesting, if nothing is specified. Maybe we should've made this parameter required... I think it's better to rerun :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants