API Reference¶
This section provides detailed API documentation for all gedi2py modules and functions.
Overview¶
gedi2py is organized into modules following the scanpy convention:
Module |
Description |
|---|---|
|
Top-level imports (GEDIModel, settings, I/O functions) |
Tools for model training, projections, embeddings, and analysis |
|
Plotting functions for visualization |
|
Input/output for data and models |
Import Convention¶
import gedi2py as gd
# Access modules
gd.tl.gedi(...) # Tools
gd.pl.embedding(...) # Plotting
gd.io.read_h5ad(...) # I/O
# Or import directly
from gedi2py import GEDIModel
from gedi2py import settings
Quick Reference¶
Core
GEDIModel- Main model class for GEDI analysis
Tools (gd.tl)
Model Training
gedi()- Run GEDI batch correction
Projections
get_projection()- Get computed projectionscompute_zdb()- Compute ZDB projectioncompute_db()- Compute DB projectioncompute_adb()- Compute ADB projection (pathway activity)
Embeddings
svd()- Compute SVD on GEDI embeddingpca()- Compute PCA on GEDI embeddingumap()- Compute UMAP on GEDI embedding
Imputation
impute()- Impute denoised expressionvariance()- Compute variancedispersion()- Compute dispersion
Differential Expression
differential()- Differential expression analysisdiff_q()- Sample-specific differential effectsdiff_o()- Offset differential effects
Pathway Analysis
pathway_associations()- Compute pathway associationspathway_scores()- Compute pathway scorestop_pathway_genes()- Get top genes per pathway
Dynamics
vector_field()- Compute vector fieldgradient()- Compute gradientpseudotime()- Compute pseudotime
Plotting (gd.pl)
Embedding Plots
embedding()- General embedding plotumap()- UMAP plotpca()- PCA plot
Convergence Plots
convergence()- Plot convergence metricsloss()- Plot loss function
Feature Plots
features()- Plot gene expressionmetagenes()- Plot metagene patternsdispersion()- Plot dispersionvariance_explained()- Plot variance explained
I/O (gd.io)
Reading
read_h5ad()- Read H5AD fileread_10x_h5()- Read 10X H5 fileread_10x_mtx()- Read 10X MTX directory
Writing
write_h5ad()- Write H5AD file
Model Persistence
save_model()- Save GEDI modelload_model()- Load GEDI model