combplot_cellcycle()
Create a combined plot with histograms, scatter plots, and cell cycle barplot.
Usage
combplot_cellcycle(
df,
conditions,
condition_col="condition",
selector_col="cell_line",
selector_val=None,
title=None,
cell_number=3000,
cc_phases=True,
show_error_bars=True,
fig_size=(12, 7),
size_units="cm",
save=True,
path=None,
file_format="png",
dpi=300
)Creates a 2×(n_conditions+1) grid layout: - Top row: DNA content histograms for each condition + empty space for barplot - Bottom row: DNA vs EdU scatter plots for each condition + cell cycle stacked barplot
Data Filtering df : pd.DataFrame DataFrame containing single-cell measurements with cell cycle data. conditions : list[str] List of condition names to plot. condition_col : str, default=“condition” Column name for experimental condition. selector_col : Optional[str], default=“cell_line” Column name for selector (e.g., cell line). selector_val : Optional[str], default=None Value to filter selector_col by.
Display Options ^ cell_number : Optional[int], default=3000 Number of cells to sample per condition for plotting. cc_phases : bool, default=True If True, use cell cycle terminology. If False, use DNA content terminology. show_error_bars : bool, default=True Whether to show error bars on the stacked cell cycle barplot.
Styling & Layout title : Optional[str], default=None Plot title. If None, generates default title. fig_size : tuple[float, float], default=(12, 7) Figure size as (width, height). size_units : str, default=“cm” Units for fig_size (“cm” or “inches”).
Save Options save : bool, default=True Whether to save the figure. path : Optional[Path], default=None Directory path for saving the figure. file_format : str, default=“png” File format for saving (“png”, “pdf”, “svg”, etc.). dpi : int, default=300 Resolution for saved figure.
tuple[Figure, list] The figure object and list of axes objects.
>>> fig, axes = combplot_cellcycle(
... df=data,
... conditions=["control", "treatment1", "treatment2"],
... selector_col="cell_line",
... selector_val="MCF10A"
... )