Thank you brother for your help. Since you are an expert, I would like to ask another question. Hope you do not mind me.
I am trying to test different values of min.dist and trying to test your code, but I got error again. I did not have a sequence of value this time and some number are random. Therefore, I replaced sth like this
group.by=glue::glue("RNA_snn_res.{c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.01, 0.005, 0.001)})
# min.dist
for(dist in c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.01, 0.005, 0.001)){
Arthritis <- RunUMAP(object = Arthritis ,
reduction = "harmony",
dims = 1:30,
min.dist = dist)
Arthritis <- FindNeighbors(object = Arthritis, reduction="harmony", dims = 1:30)
snn.obj <- FindClusters(object = Arthritis, resolution = 0.2)
p <- DimPlot(snn.obj, reduction="umap", ncol=2,
group.by=glue::glue("RNA_snn_res.{c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.01, 0.005, 0.001)})
ggsave(filename="resolution_plots.png", plot=p, height=16, width=10, device=ragg::agg_png, dpi=300)
}
I got error at group.by. Not sure if you could kindly check it for me.
Thanks in advance