peach.tl.archetypal_coordinates

peach.tl.archetypal_coordinates#

peach.tl.archetypal_coordinates(adata, *, pca_key='X_pca', archetype_coords_key='archetype_coordinates', obsm_key='archetype_distances', uns_prefix='archetype', verbose=True, **kwargs)[source]#

Extract archetypal coordinates for all cells.

Parameters:
  • adata (AnnData) – Annotated data object with trained model coordinates

  • pca_key (str, default: "X_pca") – Key in adata.obsm containing PCA coordinates

  • archetype_coords_key (str, default: "archetype_coordinates") – Key in adata.uns containing archetype coordinates

  • obsm_key (str, default: "archetype_distances") – Key to store distance matrix in adata.obsm

  • uns_prefix (str, default: "archetype") – Prefix for keys stored in adata.uns

  • verbose (bool, default: True) – Whether to print progress messages

  • **kwargs – Additional arguments passed to compute_archetype_distances

Returns:

Dictionary with archetypal coordinates and distances

Return type:

dict