paste3.helper.pca_distance
- paste3.helper.pca_distance(a_slice, b_slice, n_top_genes, latent_dim)[source]
Computes pairwise distances between two distributions slices after dimensionality reduction using PCA.
- Parameters:
a_slice (AnnData) -- AnnData object representing the first slice.
b_slice (AnnData) -- AnnData object representing the second slice.
n_top_genes (int) -- Number of highly variable genes to select for PCA.
latent_dim (int) -- Number of principal components to retain in the PCA reduction.
- Returns:
distances -- Distances between the two distributions after dimensionality reduction
- Return type:
np.ndarray