Skip to content

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

@jpintar

Description

@jpintar

What kind of feature would you like to request?

Additional function parameters / changed functionality / changed defaults?

Please describe your wishes

Two types of nearest-neighbour graph weighting are currently available in Scanpy via sc.pp.neighbors: UMAP (method="umap", the default) and Gaussian (method="gauss"). I propose adding a third: Jaccard index weights. There are three reasons for this:

  1. Jaccard weighting has been available through sc.external.tl.phenograph, but the external API is slated for removal, and the Phenograph package itself is now apparently unmaintained (last updates were in 2020, and I've unofficially heard from the Pe'er lab that they don't currently have plans for upkeep). Apart from the Jaccard weighting itself, Phenograph doesn't offer much that isn't implemented in Scanpy (and more robustly/flexibly), so its future looks generally unpromising.
  2. Jaccard weighting is the default in Seurat, so this would facilitate cross-ecosystem comparison.
  3. Jaccard weights tend to provide a different stability profile in response to changes in k compared to UMAP weights, which may be desirable for some applications.

If there is interest in this, I would be happy to draft a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage 🩺This issue needs to be triaged by a maintainer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions