:py:mod:`spatialtis_core.geo_analysis` ====================================== .. py:module:: spatialtis_core.geo_analysis Module Contents --------------- .. py:function:: getis_ord(points: spatialtis_core.types.Points, bbox: spatialtis_core.types.BoundingBox, search_level: int = 3, quad: Optional[Tuple[int, int]] = None, rect_side: Optional[Tuple[float, float]] = None, pval: float = 0.05, min_cells: int = 10) -> List[bool] Getis-ord analysis to find hot cells :param points: A list of points :param bbox: The bounding box :param search_level: The level of outer-ring to search for :param quad: eg.(X, Y) Use X * Y grid to perform analysis :param rect_side: eg.(X, Y) Use X * Y rectangle to perform analysis :param pval: The threshold for p-value :param min_cells: The minimum number of cells to perform analysis :returns: A list of bool .. py:function:: spatial_autocorr(x: numpy.ndarray, neighbors: spatialtis_core.types.Neighbors, labels: spatialtis_core.types.Labels, two_tailed: bool = True, pval: float = 0.05, method: str = 'moran_i') -> List[Tuple[float, float]] Compute spatial auto-correlation value for a 2D array in parallel The p-value is under the assumption of normal distribution Return is tuples of (spatial_autocorr value, p value) :param x: Gene expression matrix, each row is the expression of a gene :param neighbors: A list of neighbors :param labels: A list of labels :param two_tailed: Determine the p value :param pval: The p-value threshold :param method: "moran_i" or "geary_c" :returns: A list of (value, p_value) .. py:function:: spatial_distribution_pattern(points_collections: List[spatialtis_core.types.Points], bbox: spatialtis_core.types.BoundingBox, method: str = 'id', r: Optional[float] = None, resample: int = 1000, quad: Optional[Tuple[int, int]] = None, rect_side: Optional[Tuple[float, float]] = None, pval: float = 0.05, min_cells: int = 10, dims: int = 2) -> List[Tuple[float, float, int]] Compute the distribution index and determine the pattern for different cells in a ROI in parallel If data is 3D, only method="id" is supported :param points_collections: A list of list of points :param bbox: The bounding box :param method: "id" for index of dispersion, "morisita" for morisita index, "clark_evans" for clark evans' index :param r: If method == "id"; The sample windows' radius :param resample: If method == "id"; The number of sampling times :param quad: If method == "morisita"; eg.(X, Y) Use X * Y grid to perform analysis :param rect_side: If method == "morisita"; eg.(X, Y) Use X * Y rectangle to perform analysis :param pval: The threshold for p-value :param min_cells: The minimum number of cells to perform analysis :param dims: The dimension of data :returns: A list of (index_value, p_value, pattern) .. py:function:: spatial_entropy(points_collections: List[spatialtis_core.types.Points], types_collections: List[List[str]], method: str = 'leibovici', d: Optional[float] = None, cut: int = 3, dims: int = 2) -> List[float] Compute spatial entropy value of multiple ROIs in parallel :param points_collections: A list of list of points :param types_collections: A list of list of types :param bbox: The bounding box :param method: "leibovici" or "altieri" :param d: If method == "leibovici"; The distance threshold to determine co-occurrence :param cut: If method == "altieri"; The distance interval to determine co-occurrence :param dims: The dimension of data :returns: A list of spatial entropy