cellink.pl.qq#
- cellink.pl.qq(pvals_df, pval_col='pv_adj', group_col=None, figsize=None, labelsize=None, titlesize=None, n_cols=None, show_ci=True, null_line_color='purple', title=None, show=None, save=None, dpi=300, ax=None)#
Generate quantile-quantile (QQ) plots of p-values, optionally grouped by a categorical column.
- Parameters:
pvals_df (pandas.DataFrame) – DataFrame containing p-values and group labels.
pval_col (str, default 'pb_adj') – Column name in
pvals_dfcontaining p-values.group_col (str, default 'group') – Column name in
pvals_dfused to group p-values for faceted QQ plots.figsize (tuple, optional) – Size of the figure. Defaults to matplotlib’s
figure.figsizesetting.labelsize (int, optional) – Font size for axis labels. Defaults to matplotlib’s
axes.labelsize.titlesize (int, optional) – Font size for plot titles. Defaults to matplotlib’s
axes.titlesize.n_cols (int, optional) – Number of columns in the subplot grid. Only used if multiple groups are present.
show_ci (bool, default True) – Whether to display 95% confidence interval bands on the QQ plot.
title (str, optional) – Title for the plot when only one group is plotted.
show (bool or None, optional) – Whether to display the plot. If None, shows the plot only when
axis not provided.save (str or None, optional) – Path to save the figure. If provided, the figure is saved instead of shown.
dpi (int, default 300) – Resolution of the saved figure in dots per inch.
- Return type:
- Returns:
matplotlib.figure.Figure The resulting QQ plot figure.
- Raises:
ValueError – If specified
pval_colorgroup_colis not in the DataFrame, or if no valid p-values remain after filtering.