Tools (sch.tl)

The tools module provides analysis functions for energy, networks, correlations, embeddings, Jacobians, and velocity.

Energy Analysis

compute_energies(adata[, spliced_key, ...])

Calculate energy landscapes for all clusters.

decompose_degradation_energy(adata, cluster)

Calculate gene-wise degradation energy decomposition.

decompose_bias_energy(adata, cluster[, ...])

Calculate gene-wise bias energy decomposition.

decompose_interaction_energy(adata, cluster)

Calculate gene-wise interaction energy.

Network Analysis

network_correlations(adata[, cluster_key, copy])

Compute various similarity metrics between cluster interaction networks.

get_network_links(adata[, cluster_key, ...])

Extract network links (edges) from interaction matrices.

compute_network_centrality(adata[, ...])

Compute network centrality metrics for genes in each cluster.

get_top_genes_table(adata, metric[, ...])

Create formatted table with top genes per cluster for a given metric.

compute_eigenanalysis(adata[, cluster_key, copy])

Compute eigenvalue decomposition for each cluster's interaction matrix.

get_top_eigenvector_genes(adata, cluster[, ...])

Get top genes from eigenvector corresponding to extreme eigenvalue.

get_eigenanalysis_table(adata[, ...])

Create formatted table with top genes from extreme eigenvectors.

Correlation Analysis

energy_gene_correlation(adata[, ...])

Correlate energies with gene expression.

celltype_correlation(adata[, spliced_key, ...])

Compute correlation between cell types based on gene expression.

future_celltype_correlation(adata[, ...])

Compute correlation between cell types based on predicted future states.

get_correlation_table(adata[, cluster_key, ...])

Get correlation table with top genes per cluster.

Embedding

compute_umap(adata[, spliced_key, ...])

Compute UMAP embedding from gene expression data.

energy_embedding(adata[, basis, resolution, ...])

Compute energy landscape on 2D embedding space.

save_embedding(adata, filename)

Save UMAP embedding and energy grid data to file.

load_embedding(adata, filename[, basis, copy])

Load UMAP embedding and energy grid data from file.

Jacobian & Stability Analysis

compute_jacobians(adata[, spliced_key, ...])

Compute Jacobian matrices and eigenvalues for all cells.

save_jacobians(adata, filename[, ...])

Save Jacobian eigenvalues and eigenvectors to HDF5 file.

load_jacobians(adata, filename[, ...])

Load Jacobian eigenvalues and optionally eigenvectors from HDF5 file.

compute_jacobian_stats(adata[, filename, ...])

Compute summary statistics from Jacobian eigenvalues.

compute_jacobian_elements(adata, gene_pairs)

Compute specific Jacobian matrix elements (partial derivatives).

compute_rotational_part(adata[, ...])

Compute the rotational (antisymmetric) part of the Jacobian.

Velocity

compute_reconstructed_velocity(adata[, ...])

Compute reconstructed velocity from Hopfield model.

validate_velocity(adata[, velocity_key, ...])

Validate reconstructed velocity against original velocity.