Closed mauripops closed 2 years ago
Running phate on harmony cell embedding:
Mauricio,
Sorry, that looks like a mistake in the code that did not get updated after our preprint! The embedding you are showing in the top left plot (with axes labeled "phateharmony") matches the embedding we computed on harmony values. The code block for computing the harmony/PHATE embedding should be this:
# run PHATE
tmp.phate <- phate(
myo.seurat@reductions$harmony@cell.embeddings[,1:39], #cells x reduc dims
gamma=1,
n.jobs = 50
)
colnames(tmp.phate$embedding) <- paste0("phate_harmony_", 1:2)
tmp.phate$params$data <- NULL
tmp.phate$embedding[,1] <- tmp.phate$embedding[,1]*-1 #flip x-axis
myo.seurat[["phate_harmony"]] <- CreateDimReducObject(
embeddings = tmp.phate$embedding,
key = "phate_harmony_",
assay = 'RNA',
misc = tmp.phate$params
)
Note that I flipped the (arbitrary) x-axis orientation, just to make the plots more intuitive to read (differentiation going left to right). I will update the code, thanks for finding these errors!
Hey thanks, I was able to replicate the results. My issue seemed to be that I needed to run harmony on the full data set before doing the filtering. Still ended up upside down although it might be due to the the pca just running differently.
Hi! I am confused about this section of myogenic_github_v1.R It states it would run on the harmony values yet it is calling for the data slot of the seurat object. Is this correct?
Context I am trying to replicate the results from the myogenic data, following myo.slim.seurat@commands, I run PCA to 50 dimensions followed by harmony on the PCA reduction grouping by sample. For the last step I don't have parameters since adding the reduction through
CreateDimReducObject
is not leaving any data in @commnands.