Closed Larrycpan closed 2 years ago
Hi @KeWXiong! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information:
1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved?
2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example.
3. Did you post your log file? If not, add it now.
4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.
Unless I'm mis-reading your code, the problem is here:
proj_PC_1 <- addClusters(input = proj_PC_1, reducedDims = "IterativeLSI", method = "Seurat", name = "Clusters", resolution = 0.6, force = T)
You are adding clusters based on the IterativeLSI
reducedDims and then plotting the UMAP based on the Harmony
reducedDims. You should add clusters based on Harmony
instead.
Unless I'm mis-reading your code, the problem is here:
proj_PC_1 <- addClusters(input = proj_PC_1, reducedDims = "IterativeLSI", method = "Seurat", name = "Clusters", resolution = 0.6, force = T)
You are adding clusters based on the
IterativeLSI
reducedDims and then plotting the UMAP based on theHarmony
reducedDims. You should add clusters based onHarmony
instead.
Thanks, it looks much better!
@rcorces @jgranja24 Thanks for helping. Further, I use another dataset for the analysis, but the results are not consistent with previously published studies that points are relatively separate. Instead, my result seems a little strange. I have changed the parameters of dimensionality reduction and no big changes happen. How can I deal with it?
proj <- addIterativeLSI(ArchRProj = proj, useMatrix = "TileMatrix", name = "IterativeLSI",
iterations = 2, clusterParams = list(resolution = seq(0.2), sampleCells = 10000, n.start = 10),
varFeatures = 15000, dimsToUse = 1:30, threads = 40, seed = 1234, force = T)
proj <- addHarmony(ArchRProj = proj, reducedDims = "IterativeLSI", name = "Harmony", groupBy = "Sample", force = T)
proj <- addClusters(input = proj, reducedDims = "Harmony", method = "Seurat", name = "Clusters", force = T, resolution = 0.2)
proj <- addUMAP(ArchRProj = proj, reducedDims = "Harmony", name = "UMAPHarmony", nNeighbors = 30, minDist = 0.4, metric = "cosine", force = T)
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", name = "Sample", embedding = "UMAPHarmony")
p2 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", name = "Clusters", embedding = "UMAPHarmony")
Sorry - We cannot provide help with individual analyses and do not provide recommendations beyond what is in the manual and function parameter definitions.
I performed analysis as follows without reported error:
But I got the results of mixed clusters, how can I fix it?