API#
Import mTopic:
import mtopic
Core submodules#
Data reading (read)#
|
Load a MuData object from an .h5mu file. |
Preprocessing (pp)#
|
Randomly permute the count matrices in a MuData object. |
|
Apply Term Frequency-Inverse Document Frequency (TF-IDF) transformation to a specific modality in a MuData object. |
|
Perform Centered Log-Ratio (CLR) normalization on a modality in a MuData object. |
|
Scale count matrices to normalize the total sum of counts across modalities. |
|
Filter overrepresented features from a MuData object using a knee detection algorithm. |
|
Retain a specific list of features in a MuData object. |
|
Prepare feature signatures for training feature associations. |
Tools (tl)#
|
Multimodal Topic Model. |
|
GPU-accelerated Multimodal Topic Model. |
|
Spatial Multimodal Topic Model. |
|
GPU-accelerated Spatial Multimodal Topic Model. |
|
Export topic-cell and feature-topic distributions to a MuData object and filter insignificant topics. |
|
Compute z-scores for feature signatures. |
|
Perform UMAP dimensionality reduction on topic distributions. |
|
Cross-modality feature associations. |
|
K-fold cross-validation for MTM and sMTM via held-out log-likelihood to estimate the optimal number of topics. |
Plotting (pl)#
|
Fit a rational function to the mean held-out log-likelihood curve and identify the optimal number of topics. |
|
Detect and visualize overrepresented features using a knee detection algorithm. |
|
Visualize the significance of topics based on their maximum probability across cells. |
|
Visualize topic distributions on spatial coordinates or embedding. |
|
Create a scatter plot with pie charts representing topic distributions at each cell/spot coordinate. |
|
Visualize the dominant topic for each cell/spot in a MuData object. |
|
Visualize the feature signatures for each topic in a specified modality of a MuData object. |
|
Visualize the spatial or embedding-based distribution of z-scores for topics in a specified modality. |
|
Visualize the correlation matrix between two sets of features as a heatmap. |
|
Visualize the distribution of specified features in a MuData object. |