{
  "name": "Squidpy 1.8.4 graph-module functions and what each computes",
  "description": "Functions of the squidpy.gr module as listed in the Squidpy 1.8.4 stable documentation, with the one-line description the documentation gives for each. Compiled from the Squidpy graph module reference page, checked 2026-11-20.",
  "page": "https://casrai.org/guides/squidpy",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-20T12:26:41Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Function",
      "unit": "",
      "description": ""
    },
    {
      "name": "Documented purpose",
      "unit": "",
      "description": ""
    },
    {
      "name": "Typical question",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Function": "gr.nhood_enrichment",
      "Documented purpose": "Compute neighborhood enrichment by permutation test",
      "Typical question": "Which clusters sit next to each other more often than chance?"
    },
    {
      "Function": "gr.co_occurrence",
      "Documented purpose": "Compute co-occurrence probability of clusters",
      "Typical question": "How does cluster co-occurrence change with distance?"
    },
    {
      "Function": "gr.spatial_autocorr",
      "Documented purpose": "Calculate Global Autocorrelation Statistic (Moran's I or Geary's C)",
      "Typical question": "Which genes are spatially patterned?"
    },
    {
      "Function": "gr.ripley",
      "Documented purpose": "Calculate various Ripley's statistics for point processes",
      "Typical question": "Are points clustered or dispersed across scales?"
    },
    {
      "Function": "gr.ligrec",
      "Documented purpose": "Permutation test for ligand-receptor analysis, as in the CellPhoneDB work (Efremova et al., 2020)",
      "Typical question": "Which ligand-receptor pairs differ between cluster pairs?"
    },
    {
      "Function": "gr.sepal",
      "Documented purpose": "Identify spatially variable genes with Sepal",
      "Typical question": "Which genes are spatially variable?"
    },
    {
      "Function": "gr.centrality_scores",
      "Documented purpose": "Compute centrality scores per cluster or cell type",
      "Typical question": "How central is each cluster in the graph?"
    },
    {
      "Function": "gr.interaction_matrix",
      "Documented purpose": "Compute interaction matrix for clusters",
      "Typical question": "How many graph edges join each pair of clusters?"
    },
    {
      "Function": "gr.mask_graph",
      "Documented purpose": "Mask the graph based on a polygon mask",
      "Typical question": "Restrict analysis to a tissue region"
    }
  ],
  "sources": [
    {
      "title": "Squidpy documentation: graph module (gr)",
      "url": "https://squidpy.readthedocs.io/en/stable/modules/gr.html",
      "accessed": "2026-11-20"
    }
  ]
}