seurat icon indicating copy to clipboard operation
seurat copied to clipboard

FindClusters: Number of nodes/edges changes from one run to another

Open areyoukidneyme opened this issue 2 years ago • 0 comments

Hello!

I was re-knitting an html file and I the file wasn't knitted successfully because the number of clusters somehow changed. I didn't change any of my codes so I was curious why the clustering changed. I traced it back to the FindClusters command. In my original knitted file this was the output:

Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck

Number of nodes: 18134 Number of edges: 848379

Running Louvain algorithm... Maximum modularity in 10 random starts: 0.8777 Number of communities: 6 Elapsed time: 5 seconds

When I rerun the same Rmarkdown file, everything was the same until the FindClusters output:

Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck

Number of nodes: 18123 Number of edges: 851680

Running Louvain algorithm... Maximum modularity in 10 random starts: 0.8761 Number of communities: 7 Elapsed time: 3 seconds

This change, I believe, resulted in giving me more clusters.

Can anyone explain to me why this is happening and what I should do to avoid this?

Thanks in advance!

areyoukidneyme avatar Sep 05 '22 03:09 areyoukidneyme