gravatar for Pancreas Pratik

2 hours ago by

University of Connecticut

Hey ya'll,

This question is a follow-up question after the solution from here: A: How to use FindSubCluster in Seurat?

After subclustering using FindSubCluster, how do I FindAllMarkers using the additional cluster assignments on the whole SeuratObject? The cluster I subcluster is skipped over during FindAllMarkers for some reason? Any help would be appreciated. I think FindSubCluster is new to Seurat v4.0.

Any help would be appreciated.

> scfp <- FindNeighbors(scfp, graph.name = "test", dims = 1:100)
Computing nearest neighbor graph
Computing SNN
> scfp <- FindClusters(scfp, graph.name = "test", resolution = 2, algorithm = 1, verbose = TRUE)
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck

Number of nodes: 1836
Number of edges: 16978

Running Louvain algorithm...
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.7368
Number of communities: 24
Elapsed time: 0 seconds
4 singletons identified. 20 final clusters.
> #scfp <- RunUMAP(scfp, dims = 1:100)
> scfp <- RunTSNE(scfp, dims = 1:100)
> #DimPlot(scfp, reduction = "umap", label = TRUE)
> DimPlot(scfp, reduction = "tsne", label = TRUE, label.size = 6 )
> scfp <- FindSubCluster(scfp, "6", "test", subcluster.name = "blood",  resolution = .3, algorithm = 1)
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck

Number of nodes: 104
Number of edges: 819

Running Louvain algorithm...
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.7301
Number of communities: 3
Elapsed time: 0 seconds
> DimPlot(scfp, reduction = "tsne", group.by = "blood", label = TRUE, label.size = 6)
> scfp.markers <- FindAllMarkers(scfp, graph.name = "test", group.by = "blood", only.pos = TRUE, min.pct = 0.1, logfc.threshold = 0.25)
Calculating cluster 0
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=08s  
Calculating cluster 1
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=05s  
Calculating cluster 2
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=07s  
Calculating cluster 3
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=18s  
Calculating cluster 4
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=16s  
Calculating cluster 5
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=07s  
Calculating cluster 6
Calculating cluster 7
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=13s  
Calculating cluster 8
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=17s  
Calculating cluster 9
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=17s  
Calculating cluster 10
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=24s  
Calculating cluster 11
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=13s  
Calculating cluster 12
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=03s  
Calculating cluster 13
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=18s  
Calculating cluster 14
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=12s  
Calculating cluster 15
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=13s  
Calculating cluster 16
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=13s  
Calculating cluster 17
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=14s  
Calculating cluster 18
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=17s  
Calculating cluster 19
  |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=14s  
> View(scfp.markers)



Source link