atlas_protocol_scripts.pl.plot_paired#
- atlas_protocol_scripts.pl.plot_paired(adata, groupby, *, paired_by=None, var_names=None, show=True, return_fig=False, n_cols=4, panel_size=(3, 4), show_legend=False, hue=None, size=10, ylabel='expression', pvalues=None, pvalue_template=<function <lambda>>, adjust_fdr=False, boxplot_properties=None)#
Pairwise expression plot.Makes on panel with a paired scatterplot for each variable.
- Parameters
adata – adata matrix (usually pseudobulk).
groupby – Column containing the grouping. Must contain exactely two different values.
paired_by (default:
None
) – Column indicating the pairing (e.g. “patient”)var_names (default:
None
) – Only plot these variables. Default is to plot all.adjust_fdr (default:
False
) – Adjust p-values for multiple testing using the Benjamini-Hochberg procedure.boxplot_properties (default:
None
) – Properties to pass to the boxplot function.hue (default:
None
) – Column indicating the hue.n_cols (default:
4
) – Number of columns in the figure.panel_size (default:
(3, 4)
) – Size of each panel.pvalue_template (default:
<function <lambda> at 0x7f45b76bb370>
) – Template for the p-value annotation. Must contain a single placeholder for the p-value.pvalues (
Optional
[Sequence
[float
]] (default:None
)) – P-values to annotate. Must be the same length as var_names.return_fig (default:
False
) – Return the figure object.show (default:
True
) – Show the figure.show_legend (default:
False
) – Show the legend.size (default:
10
) – Size of the points.ylabel (default:
'expression'
) – Label for the y-axis.