grassp.tl.aligned_umap#
- aligned_umap(data_list, align_data=True, return_data_objects=True, n_neighbors=20, metric='euclidean', min_dist=0.1, alignment_regularisation=0.002, n_epochs=300, random_state=None, verbose=False, n_components=2)[source]#
 Aligned UMAP embedding for matched datasets.
Wraps
umap.AlignedUMAPand writes the resulting coordinates to.obsm['X_aligned_umap']of each input object.- Parameters:
 - data_list 
List[AnnData] List of
AnnDataobjects assumed to contain the same observations and variables (will be intersected if align_data isTrue).- align_data 
bool(default:True) Whether to call
align_adatas()before fitting.- return_data_objects 
bool(default:True) If
True(default) return the modified list; otherwise return the fittedumap.AlignedUMAPestimator.- n_neighbors 
int(default:20) Number of nearest neighbours to construct the UMAP graph.
- metric 
str(default:'euclidean') Distance metric used by UMAP (e.g.
"euclidean").- min_dist 
float(default:0.1) Minimum separation of points in the low-dimensional space.
- alignment_regularisation 
float(default:0.002) Weight of the between-dataset alignment objective.
- n_epochs 
int(default:300) Training epochs.
- n_components 
int(default:2) Dimensionality of the embedding (usually
2).- random_state 
int|None(default:None) Passed directly to
umap.AlignedUMAP.- verbose 
bool(default:False) Passed directly to
umap.AlignedUMAP.
- data_list 
 - Return type:
 AlignedUMAP- Returns:
 list[AnnData] | umap.AlignedUMAP Depending on return_data_objects.