- spac.transformations.run_utag_clustering(adata, features=None, k=15, resolution=1, max_dist=20, n_pcs=10, random_state=42, n_jobs=1, n_iterations=5, slide_key='Slide', layer=None, output_annotation='UTAG', associated_table=None, parallel=False, **kwargs)[source]
Run UTAG clustering on the AnnData object.
- Parameters:
adata (anndata.AnnData) – The AnnData object.
features (list) – List of features to use for clustering or for PCA. Default (None) is to use all.
k (int) – The number of nearest neighbor to be used in creating the graph. Default is 15.
resolution (float) – Resolution parameter for the clustering, higher resolution produces more clusters. Default is 1.
max_dist (float) – Maximum distance to cut edges within a graph. Default is 20.
n_principal_components (int) – Number of principal components to use for clustering.
random_state (int) – Random state for reproducibility.
n_jobs (int) – Number of jobs to run in parallel. Default is 5.
n_iterations (int) – Number of iterations for the clustering.
slide_key (str) – Key of adata.obs containing information on the batch structure of the data.In general, for image data this will often be a variable indicating the imageb so image-specific effects are removed from data. Default is “Slide”.
- Returns:
adata – Updated AnnData object with clustering results.
- Return type:
anndata.AnnData