camlab-bioml / starling

Segmentation error aware clustering for multiplexed imaging
https://camlab-bioml.github.io/starling/
Other
12 stars 2 forks source link

Use Leiden algorithm and add argument for resolution in Phenograph option in utility.init_clustering() #35

Open DC123456789 opened 1 year ago

DC123456789 commented 1 year ago

The Phenograph option in utility.init_clustering() currently uses the Louvain algorithm (which is the default setting) and has no option for adjusting the number of clusters. Generally, the Leiden algorithm seems to be considered better than Louvain and can be enabled by the clustering_algo option; it also has the benefit of having an easy parameter to adjust number of clusters (resolution_parameter) which could easily be set using the k argument that already exists in the function.

DC123456789 commented 11 months ago

Also, the phenograph call needs to have the seed argument set to be reproducible, as pl.seed_everything() doesn't seem to set its random seed properly.