Skip to content

Conversation

jpintar
Copy link

@jpintar jpintar commented Oct 7, 2025

Adds jaccard as a method in sc.pp.neighbors alongside umap and gauss. The method performs a weighting of the kNN adjacency graph using Jaccard coefficients between pairs of connected vertices. This is the weighting used in the PhenoGraph package and in Seurat, and it is especially useful to include it here in light of PhenoGraph no longer being actively maintained and the sc.external API being slated for removal, as mentioned in #3828.

N.b., the present implementation of the weighting is notably faster than that in PhenoGraph, since it avoids looping over set intersections in favour of sparse matrix operations, but it returns identical results for identical input matrices of kNN indices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add jaccard as an additional method in sc.pp.neighbors

1 participant