Open yannk-lm opened 2 years ago
Hi Yannick,
Apologies for the delay in getting back to you.
If you are still interested in tackling this, (1) the input to harmony::HarmonyMatrix()
should be the uncorrected PCA matrix (PCs x cells). (2) the loadings should be the PCA loadings used to project the cells into the lower-dimensional space (dimensions cells x PCs), which should be retrievable from irlba (but I am not sure about the scran function).
You'll also need the Harmony object that is returned by the call to harmony::RunHarmony
Hello,
I wanted to use the mapQuery function on a UMAP generated from Harmony spaces by my regular pipeline. Then I saw in #15 that it wasn't implemented, so I thought about a different approach.
If I could generate a Symphony reference (using
harmony::HarmonyMatrix()
intosymphony::buildReferenceFromHarmonyObj()
) where the input (embeddings, parameters, seeds) are strictly identical to the one I use in my regular pipeline, it should produce (I think) the same result.However, I am using a wrapper function that use SingleCellExperiment object as input to generate and to store my PCA. Since I have some trouble understanding your processing of the
irlba::irlba()
output in your vignette, I was wondering if there was a way to extract from my SCE object : 1) the input needed for the data_mat argument inharmony::HarmonyMatrix()
2) the loadings forsymphony::buildReferenceFromHarmonyObj()
FYI this is my regular pipeline :
dec<-scran::modelGeneVar(sce)
top.hvgs <- scran::getTopHVGs(dec, n=hvgs)
set.seed(0)
sce<-scran::fixedPCA(sce, subset.row=top.hvgs, assay.type = "logcounts", BSPARAM = BiocSingular::IrlbaParam())
set.seed(0)
sce <- harmony::RunHarmony(sce, "sample)
set.seed(0)
sce <- scater::runUMAP(sce, dimred="HARMONY", n_dimred = 30)
Thank you very much for your help and please let me know if some point are not clear enough.
Regards, Yannick