tomodrgn.analysis#
Functions for analysis of particle metadata: index, pose, ctf, latent embedding, label, tomogram spatial context, etc.
Functions
Cluster latent embeddings using a K-component full covariance Gaussian mixture model. |
|
Cluster latent embeddings using k-means clustering. |
|
Combine multiple indices selections by either intersection or union. |
|
Rescale dataframe coordinates from angstroms to unitless voxels corresponding to reconstructed tomograms. |
|
Convert selected indices relative to a filtered particle stack into indices relative to the unfiltered particle stack. |
|
Sample num_colors from the ChimeraX color scheme as RGBA tuples normalized [0,1]. |
|
Sample num_colors colors from the specified color map as RGBA tuples |
|
Get the indices of particles belonging to the selected clusters. |
|
Find the closest point in data to query. |
|
Sample latent embeddings along specified principal component dim at coordininates in PC-space specified by sampling_points. |
|
Create and display an interactive plotly scatter plot and associated ipywidgets custom widgets, allowing exploration of numeric columns of a pandas dataframe. |
|
An interactive tomogram and particle viewer using plotly and ipywidgets. |
|
Merge known types of numpy arrays into a single pandas dataframe for downstream analysis. |
|
Parse MSE, KLD, and total loss at each epoch from run.log output. |
|
Parse total loss at each epoch from run.log output. |
|
Plot all points x,y with colors per class labels, with optional annotations for each cluster center and corresponding label. |
|
Plot all points x,y with colors per class labels on individual subplots for each of labels_sel. |
|
Plot the distribution of Euler angles as a hexbin of theta and phi, and a histogram of psi. |
|
Plot the distribution of class labels per tomogram or micrograph as a heatmap. |
|
Plot the total loss, reconstruction loss, and KLD divergence per epoch. |
|
Plot a stack of grayscale images. |
|
Plot two reference vectors (e.g. l-UMAP1 and l-UMAP2) for potential correlation with a third query vector (e.g. CoordinateX, DefocusU, etc.). |
|
Plot the distribution of shifts in x-axis vs shifts in y-axis (units: px) |
|
Create merged dataframe containing: |
|
Run principal component analysis on the latent embeddings. |
|
Run t-SNE dimensionality reduction on latent embeddings. |
|
Run UMAP dimensionality reduction on latent embeddings. |
|
Create a scatter plot with optional annotations for each cluster center and corresponding label. |
|
Create a hexbin plot with optional annotations for each cluster center and corresponding label. |
|
Create a scatter plot colored by auto-mapped values of c according to specified cmap, and plot a corresponding colorbar. |