scHopfield

Getting Started

  • Installation
    • Prerequisites
    • Installation Methods
      • From Source (Recommended)
      • Standard Installation
      • With Optional Dependencies
    • Dependencies
      • Core Dependencies
      • Optional Dependencies
    • System Requirements
    • Verify Installation
    • Troubleshooting
      • PyTorch Installation Issues
      • igraph Installation Issues
      • Using Conda Environment
    • Next Steps
  • Quick Start
    • Basic Workflow
      • Import Libraries
      • Load Data
      • 1. Preprocessing
      • 2. Network Inference
      • 3. Energy Analysis
      • 4. Network Analysis
      • 5. Stability Analysis
      • 6. Visualization
      • 7. Dynamics Simulation
    • Advanced: Perturbation Experiments
    • Typical Workflow Summary
    • Next Steps
  • Tutorial
    • Overview
    • Dataset
    • Prerequisites
    • Step-by-Step Analysis
    • See Also

User Guide & Examples

  • Getting Started with scHopfield
  • Network Inference
    • Theory
    • Basic Usage
  • Preprocessing
    • Sigmoid Function Fitting
      • Fitting Process
    • 1.1 Setup & Imports
    • 1.2 Data Loading
    • 1.3 Preprocessing
    • 1.4 Sigmoid Fitting
    • 1.5 Network Inference (no scaffold)
    • 1.6 Scaffold-Constrained Inference
    • 1.7 Save / Load Model
  • Energy Analysis
    • Energy Function
    • Computing Energies
  • Visualization
    • Energy Plots
    • Setup
    • 2.1 Compute & Decompose Energies
    • 2.2 Energy Boxplots by Cell Type
    • 2.3 Energy on UMAP
    • 2.4 Energy–Gene Correlations
    • 2.5 Corner Gene Identification
  • Network Analysis
    • Network Centrality
    • Setup
    • 3.1 Network Correlation Dendrograms
    • 3.2 Symmetricity Analysis
    • 3.3 Network Centrality
    • 3.4 Eigenanalysis
    • 3.5 GRN Visualisation
  • Stability Analysis
    • Overview
    • Computing Jacobians
    • Setup
    • 4.1 Compute Jacobian Matrices
    • 4.2 Jacobian Statistics
    • 4.3 Eigenvalue Spectra
    • 4.4 Rotational Dynamics
    • 4.5 Element-wise Jacobian Analysis
  • Perturbation Analysis
  • Dynamics Simulation
    • Theory
    • Basic Trajectory Simulation
    • 5.1 Setup
      • Load CellOracle tutorial data (Paul et al. 2015)
      • Estimate velocities from pseudotime
      • Sigmoid fitting
      • GRN scaffold from CellOracle base GRN
      • GRN inference
    • 5.2 ODE-based Single-Cell Trajectories
    • 5.3 Dataset-wide ODE Perturbation
    • 5.4 GRN Propagation-based Perturbation
    • 5.5 Perturbation Flow on Embedding
      • CellOracle-style flow (propagation-based shift)
      • Hopfield-style flow (ODE-based shift)
  • Lineage Drivers
    • MOVE TO PACKAGE (sch)
    • KEEP IN NOTEBOOK (study-specific)
  • Extended Perturbation
    • Package vs Notebook: Methods Classification
      • MOVE TO PACKAGE (sch)
      • KEEP IN NOTEBOOK (study-specific)
    • Section D: Dose-Response Curves
    • Section G: Stat3 Tier Classification via Differential Expression
    • Section H: Recipe Double KO — Anchored Partner Selection
    • Section I: STAT Family Regulatory Circuit via W^c Inspection
    • Section F: Future Work
      • Perturb-seq Correlation (High priority #2)
      • Regularization Robustness (Medium priority #8)
    • Summary of Key Findings
    • Section A (revised): Stat3 KO Perturbation Flow
    • Section B (revised): Short-time Cascade Timing
    • Section C (new): TF KO Lineage Bias Ranking
    • Section D (new): Cluster-level ΔX at Convergence
    • Figure Assembly

API Reference

  • Preprocessing (sch.pp)
    • scHopfield.preprocessing.fit_all_sigmoids
      • fit_all_sigmoids()
    • scHopfield.preprocessing.compute_sigmoid
      • compute_sigmoid()
  • Inference (sch.inf)
    • scHopfield.inference.fit_interactions
      • fit_interactions()
  • Tools (sch.tl)
    • Energy Analysis
      • scHopfield.tools.compute_energies
        • compute_energies()
      • scHopfield.tools.decompose_degradation_energy
        • decompose_degradation_energy()
      • scHopfield.tools.decompose_bias_energy
        • decompose_bias_energy()
      • scHopfield.tools.decompose_interaction_energy
        • decompose_interaction_energy()
    • Network Analysis
      • scHopfield.tools.network_correlations
        • network_correlations()
      • scHopfield.tools.get_network_links
        • get_network_links()
      • scHopfield.tools.compute_network_centrality
        • compute_network_centrality()
      • scHopfield.tools.get_top_genes_table
        • get_top_genes_table()
      • scHopfield.tools.compute_eigenanalysis
        • compute_eigenanalysis()
      • scHopfield.tools.get_top_eigenvector_genes
        • get_top_eigenvector_genes()
      • scHopfield.tools.get_eigenanalysis_table
        • get_eigenanalysis_table()
    • Correlation Analysis
      • scHopfield.tools.energy_gene_correlation
        • energy_gene_correlation()
      • scHopfield.tools.celltype_correlation
        • celltype_correlation()
      • scHopfield.tools.future_celltype_correlation
        • future_celltype_correlation()
      • scHopfield.tools.get_correlation_table
        • get_correlation_table()
    • Embedding
      • scHopfield.tools.compute_umap
        • compute_umap()
      • scHopfield.tools.energy_embedding
        • energy_embedding()
      • scHopfield.tools.save_embedding
        • save_embedding()
      • scHopfield.tools.load_embedding
        • load_embedding()
    • Jacobian & Stability Analysis
      • scHopfield.tools.compute_jacobians
        • compute_jacobians()
      • scHopfield.tools.save_jacobians
        • save_jacobians()
      • scHopfield.tools.load_jacobians
        • load_jacobians()
      • scHopfield.tools.compute_jacobian_stats
        • compute_jacobian_stats()
      • scHopfield.tools.compute_jacobian_elements
        • compute_jacobian_elements()
      • scHopfield.tools.compute_rotational_part
        • compute_rotational_part()
    • Velocity
      • scHopfield.tools.compute_reconstructed_velocity
        • compute_reconstructed_velocity()
      • scHopfield.tools.validate_velocity
        • validate_velocity()
  • Plotting (sch.pl)
    • Energy Plots
      • scHopfield.plotting.plot_energy_landscape
        • plot_energy_landscape()
      • scHopfield.plotting.plot_energy_components
        • plot_energy_components()
      • scHopfield.plotting.plot_energy_boxplots
        • plot_energy_boxplots()
      • scHopfield.plotting.plot_energy_scatters
        • plot_energy_scatters()
    • Network Plots
      • scHopfield.plotting.plot_interaction_matrix
        • plot_interaction_matrix()
      • scHopfield.plotting.plot_network_centrality_rank
        • plot_network_centrality_rank()
      • scHopfield.plotting.plot_centrality_comparison
        • plot_centrality_comparison()
      • scHopfield.plotting.plot_gene_centrality
        • plot_gene_centrality()
      • scHopfield.plotting.plot_centrality_scatter
        • plot_centrality_scatter()
      • scHopfield.plotting.plot_eigenvalue_spectrum
        • plot_eigenvalue_spectrum()
      • scHopfield.plotting.plot_eigenvector_components
        • plot_eigenvector_components()
      • scHopfield.plotting.plot_eigenanalysis_grid
        • plot_eigenanalysis_grid()
      • scHopfield.plotting.plot_grn_network
        • plot_grn_network()
      • scHopfield.plotting.plot_grn_subset
        • plot_grn_subset()
    • Jacobian Plots
      • scHopfield.plotting.plot_jacobian_eigenvalue_spectrum
        • plot_jacobian_eigenvalue_spectrum()
      • scHopfield.plotting.plot_jacobian_eigenvalue_boxplots
        • plot_jacobian_eigenvalue_boxplots()
      • scHopfield.plotting.plot_jacobian_stats_boxplots
        • plot_jacobian_stats_boxplots()
      • scHopfield.plotting.plot_jacobian_element_grid
        • plot_jacobian_element_grid()
    • Correlation Plots
      • scHopfield.plotting.plot_gene_correlation_scatter
        • plot_gene_correlation_scatter()
      • scHopfield.plotting.plot_correlations_grid
        • plot_correlations_grid()
    • Perturbation Plots
      • scHopfield.plotting.plot_perturbation_effect_heatmap
        • plot_perturbation_effect_heatmap()
      • scHopfield.plotting.plot_perturbation_magnitude
        • plot_perturbation_magnitude()
      • scHopfield.plotting.plot_gene_response
        • plot_gene_response()
      • scHopfield.plotting.plot_top_affected_genes_bar
        • plot_top_affected_genes_bar()
      • scHopfield.plotting.plot_simulation_comparison
        • plot_simulation_comparison()
    • Flow Plots
      • scHopfield.plotting.plot_reference_flow
        • plot_reference_flow()
      • scHopfield.plotting.visualize_perturbation_flow
        • visualize_perturbation_flow()
    • Other Plots
      • scHopfield.plotting.plot_sigmoid_fit
        • plot_sigmoid_fit()
      • scHopfield.plotting.plot_trajectory
        • plot_trajectory()
  • Dynamics (sch.dyn)
    • Classes
      • scHopfield.dynamics.ODESolver
        • ODESolver
    • ODE-based Simulation
      • scHopfield.dynamics.create_solver
        • create_solver()
      • scHopfield.dynamics.simulate_trajectory
        • simulate_trajectory()
      • scHopfield.dynamics.simulate_perturbation
        • simulate_perturbation()
    • CellOracle-style GRN Propagation
      • scHopfield.dynamics.simulate_shift
        • simulate_shift()
      • scHopfield.dynamics.calculate_perturbation_effect_scores
        • calculate_perturbation_effect_scores()
      • scHopfield.dynamics.calculate_cell_transition_scores
        • calculate_cell_transition_scores()
      • scHopfield.dynamics.get_top_affected_genes
        • get_top_affected_genes()
      • scHopfield.dynamics.compare_perturbations
        • compare_perturbations()

Additional Information

  • Data Storage Conventions
    • Overview
    • adata.var (Gene-level Data)
      • Sigmoid Parameters
      • Network Parameters (per cluster)
      • Network Centrality (per cluster)
      • Correlations (per cluster)
    • adata.obs (Cell-level Data)
      • Energy Values
      • Jacobian Statistics
    • adata.varp (Gene-Gene Matrices)
      • Interaction Matrices (per cluster)
    • adata.obsm (Cell Embeddings)
      • Dimensionality Reduction
      • Jacobian Eigenvalues
    • adata.varm (Gene-Dimensional Arrays)
      • Energy Embedding
    • adata.layers (Expression Matrices)
      • Transformed Expression
      • Velocity
    • adata.uns[‘scHopfield’] (Metadata)
      • Configuration
      • Models & Embeddings
      • Energy Grids (per cluster)
      • Network Analysis
      • Eigenanalysis (per cluster)
    • Example: Accessing Results
    • See Also
  • FAQ
    • Frequently Asked Questions
      • Installation
      • Data Requirements
      • Analysis
      • Memory Issues
      • Results
      • Troubleshooting
      • Contributing
    • Still Have Questions?
  • Changelog
    • Version 0.1.0 (2025-01-26)
      • Features
      • API
      • Dependencies
    • Future Releases
  • Contributing
    • Ways to Contribute
    • Getting Started
      • Development Setup
    • Code Guidelines
      • Style
      • Documentation
      • Testing
    • Pull Request Process
    • Commit Messages
    • Code Organization
    • Adding New Features
      • Analysis Functions
      • Plotting Functions
    • Reporting Bugs
    • Feature Requests
    • Questions?
scHopfield
  • Search


© Copyright 2025, scHopfield Contributors.

Built with Sphinx using a theme provided by Read the Docs.