scHopfield Documentation

Single-cell Hopfield Network Analysis

Welcome to scHopfield’s documentation! This package provides comprehensive tools for analyzing single-cell RNA-seq data using Hopfield network models.

Python Version License

Overview

scHopfield models gene regulatory networks (GRNs) as continuous Hopfield networks, where gene expression dynamics follow:

\[\frac{dx}{dt} = W \cdot \sigma(x) - \gamma \cdot x + I\]

Key components:

  • W: Interaction matrix encoding gene-gene regulatory relationships

  • σ(x): Sigmoid activation function fitted to expression data

  • γ: Degradation rates (mRNA decay)

  • I: Bias vector representing external inputs/basal expression

This formulation enables:

  • Energy landscapes that quantify cellular state stability

  • Jacobian analysis for local stability and bifurcation detection

  • Network topology analysis via centrality metrics and eigenanalysis

  • Trajectory simulation for perturbation experiments and cell fate prediction

Key Features

Core Functionality

  • Preprocessing: Sigmoid function fitting to gene expression distributions

  • Network Inference: Learn interaction matrices from RNA velocity

  • Energy Landscapes: Compute and decompose into interaction, degradation, and bias components

Network Analysis

  • Topology Analysis: Centrality metrics (degree, betweenness, eigenvector)

  • Eigenanalysis: Eigenvalue decomposition of interaction matrices

  • Network Comparison: Compare GRN structures across cell types

  • GRN Visualization: Interactive network graphs

Stability & Dynamics

  • Jacobian Analysis: Compute Jacobian matrices at each cell state

  • Stability Metrics: Eigenvalue spectra, trace, rotational components

  • Trajectory Simulation: Simulate gene expression dynamics

  • Perturbation Analysis: In-silico gene knockouts and overexpression

Visualization

  • Energy plots: Landscapes, boxplots, scatter plots

  • Network plots: Interaction matrices, GRN graphs, centrality rankings

  • Stability plots: Jacobian eigenvalue spectra, partial derivatives on UMAP

  • Dynamics plots: Trajectory visualization

Contents

User Guide & Examples

Indices and tables