API

Import MESA as:

import mesa as ms

Multiomics

multiomics.multiomics_spatial.get_spatial_knn_indices(...)

Compute k-nearest neighbors of locations.

multiomics.multiomics_spatial.get_global_neighborhood_composition(...)

Compute the composition of neighbors for each sample.

multiomics.multiomics_spatial.get_avg_expression_neighbors(...)

Calculate the average expression values over the neighbors of each data point. :type exp_df: DataFrame :param exp_df: The DataFrame to process. Each row represents a data point (e.g., a cell in single-cell data), and each column represents an attribute of the data points (e.g., gene expression values). :type exp_df: pd.DataFrame :type spatial_knn_indices: ndarray :param spatial_knn_indices: The indices that represent the k-nearest neighbors for each data point in a spatial data structure. :type spatial_knn_indices: np.ndarray.

Ecospatial

ecospatial.generate_patches(spatial_data, ...)

Generate a list of patches from a spatial data object.

ecospatial.calculate_shannon_entropy(counts)

Calculate the Shannon entropy of a set of counts.

ecospatial.calculate_diversity_index(...[, ...])

Calculate the heterogeneity index for a set of patches.

ecospatial.diversity_heatmap(spatial_data, ...)

This function visualizes the heterogeneity indices as a heatmap on the original spatial data.

ecospatial.global_spatial_stats(grid[, ...])

Perform global spatial autocorrelation analysis.

ecospatial.local_spatial_stats(grid[, mode, ...])

Compute local indicators of spatial association (LISA) for local spatial autocorrelation, and return significant hotspots and coldspots.

ecospatial.calculate_MDI(spatial_data, ...)

Calculate the multiscale diversity index (MDI).

ecospatial.calculate_GDI(spatial_data, ...)

Calculates a generalized diversity index (GDI) for specified libraries within spatial data.

ecospatial.calculate_DPI(spatial_data, ...)

Calculate the proximity index for spatial data regions, identifying hotspots or coldspots based on diversity indices.

ecospatial.spot_cellfreq(spatial_data, ...)

This function analyzes cell frequency and co-occurrence across different spots in spatial data based on specified library IDs and clustering keys, applying spatial statistics methods.