cellink.pl.expression_by_genotype#
- cellink.pl.expression_by_genotype(dd, snp=None, celltype_key='celltype', gene_filter=None, celltype_filter=None, mode='cell_type', n_cols=None, a0='a0', a1='a1', figsize=None, labelsize=None, titlesize=None, plot_type='violin', show_stripplot=False, show_axis_ticks=True, title=None, palette='Set2', show=None, save=None, dpi=300, ax=None)#
Plot gene expression by donor genotype across cell types or genes.
- Parameters:
dd (DonorData) – Donor-level expression and genotype data.
celltype_key (str) – Column in
.obsdenoting cell type.gene_filter (list) – Genes to include in the plot.
celltype_filter (list) – Optional list of cell types to include.
mode ({'cell_type', 'gene'}) – Group plots by cell type or gene.
n_cols (int) – Number of columns in FacetGrid.
a0 (str) – Column name for allele 0.
a1 (str) – Column name for allele 1.
figsize (tuple) – Size of the figure.
labelsize (int) – Size of axis labels.
titlesize (int) – Title font size.
plot_type ({'violin', 'box'}) – Plot type to use.
show_stripplot (bool) – Whether to overlay a stripplot.
show_axis_ticks (bool) – Whether to show axis ticks for subplots.
title (str) – Title for the plot.
palette (str) – Seaborn color palette.
show (bool or None) – Whether to display the plot. Defaults to auto-show behavior.
save (str or bool or None) – File path or boolean to save the plot.
ax (matplotlib.axes.Axes or None) – Optional matplotlib Axes to plot into.
dpi (int) – Resolution for saved image.
- Return type:
- Returns:
matplotlib.figure.Figure The resulting figure.