Skip to main content
Glama

louvain

Detect communities in single-cell RNA sequencing data using the Louvain clustering algorithm. Customize resolution, random state, and clustering flavor (vtraag, igraph, RAPIDS) for precise cell grouping.

Instructions

Louvain clustering algorithm for community detection

Input Schema

NameRequiredDescriptionDefault
directedNoInterpret the adjacency matrix as directed graph.
flavorNoPackage for computing the clustering: 'vtraag' (default, more powerful), 'igraph' (built-in method), or 'rapids' (GPU accelerated).vtraag
key_addedNoKey under which to add the cluster labels.louvain
neighbors_keyNoUse neighbors connectivities as adjacency. If specified, louvain looks .obsp[.uns[neighbors_key]['connectivities_key']] for connectivities.
obspNoUse .obsp[obsp] as adjacency. You can't specify both `obsp` and `neighbors_key` at the same time.
partition_kwargsNoKey word arguments to pass to partitioning, if 'vtraag' method is being used.
random_stateNoChange the initialization of the optimization.
resolutionNoFor the default flavor ('vtraag') or for 'RAPIDS', you can provide a resolution (higher resolution means finding more and smaller clusters), which defaults to 1.0.
use_weightsNoUse weights from knn graph.

Input Schema (JSON Schema)

{ "description": "Input schema for the Louvain clustering algorithm.", "properties": { "directed": { "default": true, "description": "Interpret the adjacency matrix as directed graph.", "title": "Directed", "type": "boolean" }, "flavor": { "default": "vtraag", "description": "Package for computing the clustering: 'vtraag' (default, more powerful), 'igraph' (built-in method), or 'rapids' (GPU accelerated).", "enum": [ "vtraag", "igraph", "rapids" ], "title": "Flavor", "type": "string" }, "key_added": { "default": "louvain", "description": "Key under which to add the cluster labels.", "title": "Key Added", "type": "string" }, "neighbors_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Use neighbors connectivities as adjacency. If specified, louvain looks .obsp[.uns[neighbors_key]['connectivities_key']] for connectivities.", "title": "Neighbors Key" }, "obsp": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Use .obsp[obsp] as adjacency. You can't specify both `obsp` and `neighbors_key` at the same time.", "title": "Obsp" }, "partition_kwargs": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "description": "Key word arguments to pass to partitioning, if 'vtraag' method is being used.", "title": "Partition Kwargs" }, "random_state": { "default": 0, "description": "Change the initialization of the optimization.", "title": "Random State", "type": "integer" }, "resolution": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "For the default flavor ('vtraag') or for 'RAPIDS', you can provide a resolution (higher resolution means finding more and smaller clusters), which defaults to 1.0.", "title": "Resolution" }, "use_weights": { "default": false, "description": "Use weights from knn graph.", "title": "Use Weights", "type": "boolean" } }, "title": "LouvainModel", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huang-sh/scmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server