Reference
All functions
Kinetic functions
Fits a cell count model (CCM) for a given genotype using a specified dataset of cell counts (CCS).
Fits a wild type (WT) model to a cell dataset (CDS) by estimating cell count dynamics over time and accounting for nuisance variables.
Fits models for analyzing multi-timepoint perturbation data using a cell dataset (cds).
plot_cell_type_control_kinetics()
Generates a kinetic plot of cell type control data over time.
plot_cell_type_perturb_kinetics()
Generates a plot to visualize the kinetics of cell type perturbations over time.
Graph functions
Creates a new cell state graph object from an input graph and a cell count set.
Fits the wild-type model and assembles a state transition graph for a partition of the data.
Simplifies a directed state transition graph by contracting nodes according to a specified grouping variable.
Retrieves the immediate parent node(s) of a given cell state in a state graph.
Recursively retrieves all upstream ancestor parents for a given cell state in a state graph.
Retrieves the children of a given cell state in a state graph.
Retrieves the sibling states — those sharing the same parent — of a given cell state in a state graph.
get_descendants() (develop_refactor branch only)
Recursively retrieves every downstream descendant of a given cell state in a state graph.
get_roots() (develop_refactor branch only)
Finds the root node(s) — origins with no incoming edges — of a cell state's connected component in a state graph.
Finds and scores paths from a perturbation's gained/parentless-lost cell groups to its lost cell groups on a pathfinding graph.
DEG functions
Compares gene expression over a given state transition graph, scoring genes according to their expression pattern across states.
compare_genes_within_state_graph()
Compares gene expression within a state graph, contrasting a perturbation against control(s) within each cell state.
Classifies a single cell state's gene expression pattern relative to its parents, children, and siblings in the state graph.
Decorates a within-state DEG table with an empirical FDR for the low-expression, control-sampling artifact in control-heavy designs.
Per-cell-type perturbation-arm replicate support, computed from a cell_data_set.
Per-cell-type perturbation-arm support, from a plain coldata table.
Builds a control-split empirical null for the DEG artifact, for training the full eFDR model.
Trains the empirical-FDR null model (2-D tail surfaces over expression x thin-arm cell count) from control-split null draws.
annotate_empirical_fdr_model()
Annotates a DEG table with per-gene empirical_p/empirical_fdr using a trained efdr_model — the fuller, arm-size-conditioned version of annotate_empirical_fdr().
Enrichment functions
calc_gsea_enrichment_on_state_specific_genes()
Runs rank-based GSEA on a single cell state's genes, ranked by their pattern activity score, against a supplied gene set table.
Runs over-representation analysis (ORA) on the up/down-regulated genes at every cell state in a graph-wide DEG table.
Phenotyping functions
categorize_genetic_requirements()
Classifies lost cell states as directly or indirectly required for a genotype, based on state graph topology.
summarize_impact_in_lineage_context() (develop_refactor branch only)
Builds a lineage-wide impact table from your abundance/fitness/identity calls, DEGs, and pathway enrichment — pass llm_fun = NULL to build it without an LLM.
Translates a hand- or upstream-assembled impact table into the standardized fields the phenotype-plotting functions expect.
Converts an impact table with impact_to_phenos() and renders the annotated phenotype calls on a cell state graph in one call.
Draws phenotype calls (abundance fill + identity glyph) on a cell state graph from a table already run through impact_to_phenos().
Summarizes an impact table as stacked bar counts of abundance/fitness/identity phenotypes per tissue.
Plotting functions
Generates a plot of cell state graphs with various customization options.
Plots gene expression data on a cell state graph.
Generates a plot to visualize changes in cell state abundances.
Plots differentially expressed genes (DEGs) on a cell state graph, with customizable appearance and layout options.
Builds a clustered heatmap of log fold changes for a supplied gene list, retaining only cell groups with a detected, significant hit among them.