symphonypy icon indicating copy to clipboard operation
symphonypy copied to clipboard

harmony or not

Open Sirin24 opened this issue 1 year ago • 1 comments

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",
)

Sirin24 avatar Sep 05 '24 20:09 Sirin24

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 :(

potulabe avatar Sep 08 '24 02:09 potulabe