@@ -42,6 +42,7 @@ def __init__(
4242 build_gene_index : bool = False ,
4343 feature_name : str = None ,
4444 if_lognorm : bool = True ,
45+ if_normalize_spatial_coord : bool = True ,
4546 ):
4647 """
4748 Initiate models, including setting attributes and building kd-tree for each field of view.
@@ -61,9 +62,12 @@ def __init__(
6162 build_gene_index:
6263 Whether to build scfind index or use adata.X directly. If set True, build scfind index otherwise use adata.X directly.
6364 feature_name:
64- The label or key in the AnnData object's variables (var) that corresponds to the feature names.
65+ The label or key in the AnnData object's variables (var) that corresponds to the feature names.
6566 if_lognorm:
6667 Whether to log normalize the expression data, default is True
68+ if_normalize_spatial_coord:
69+ If True, normalizes spatial coordinates so mean nearest neighbor distance equals 1.
70+ Set to False if original spatial units should be preserved.
6771 """
6872 # Each element in self.spatial_queries stores a spatial_query object
6973 self .spatial_key = spatial_key
@@ -97,6 +101,7 @@ def __init__(
97101 build_gene_index = build_gene_index ,
98102 feature_name = feature_name ,
99103 if_lognorm = if_lognorm ,
104+ if_normalize_spatial_coord = if_normalize_spatial_coord ,
100105 ) for i , adata in enumerate (adatas )]
101106
102107
0 commit comments