🔍 Do the Same Number of Shared Neighbors Always Mean Equal Similarity in Seurat?

Author: Sedat Kacar

Date:

🧠 Understanding the SNN Graph in FindNeighbors()

Let’s dig into how FindNeighbors() in Seurat constructs the Shared Nearest Neighbor (SNN) graph—and why simply counting shared neighbors doesn’t tell the full story.

📊 Scenario Setup

Imagine:

At first glance, you might think A–B and C–B are equally similar... but they’re not. Here's why:

📐 SNN Uses the Jaccard Index

The Jaccard similarity compares shared neighbors over total unique ones:

Similarity = Shared / (A_neighbors + B_neighbors − Shared)

Plug in the values:

SNN Similarity Chart

✅ What Does This Tell Us?

Even with the same number of shared neighbors, A is more similar to B than C is. That’s because:

🎯 Key Takeaway

In SNN graphs, context is everything. A small overlap in a short neighbor list carries more weight than the same overlap in a long list.

🔖 Tags

#Seurat #scRNAseq #Bioinformatics #RStats #SingleCell #DataScience #GraphTheory #Clustering #SparseMatrix #DataVisualization #FindClusters #AlWahhab