HRCHY-CytoCommunity API Reference

This section introduces the core module and function interface of HRCHY-CytoCommunity


models

hrchy_cytocommunity.models.HRCHYCytoCommunity.HRCHYCytoCommunity(...)

Hierarchical Community Detection Model (base model)

hrchy_cytocommunity.models.HRCHYCytoCommunity.HRCHYCytoCommunityGrand(...)

Hierarchical Community Detection Model (full model)

hrchy_cytocommunity.models.auto_k.HRCHYClusterAutoK(...)

identify the optimal clustering number for HRCHY-CytoCommunity model based on clustering stability

Dataset

hrchy_cytocommunity.models.dataset.SpatialOmicsImageDataset(root)

Spatial omics dataset loader for HRCHY-CytoCommunity.

Preprocessing

hrchy_cytocommunity.tools.data_preprocessing.formulate_HRCHYCytoCommunity_input_from_anndata_singlecell(...)

Formulate HRCHY-CytoCommunity input files from a single-cell spatial transcriptomics AnnData object.

hrchy_cytocommunity.tools.data_preprocessing.formulate_HRCHYCytoCommunity_input_from_anndata_spot(...)

Formulate HRCHY-CytoCommunity input files from an AnnData object of spatial transcriptomics data with cell type deconvolution results.

hrchy_cytocommunity.tools.data_preprocessing.compute_knn(...)

Construct a K-Nearest Neighbor (KNN) graph and optionally save it to file.

Visualize

hrchy_cytocommunity.visualization.visualization.load_base_data(...)

Load spatial coordinate and optional annotation data for a specific region graph.

hrchy_cytocommunity.visualization.visualization.vis_scatter_label(...)

Visualize spatial scatter plots colored by cluster or cell-type labels.

hrchy_cytocommunity.visualization.visualization.vis_heatmap(mat)

Visualize a heatmap for a given matrix or DataFrame.