mira.pl.plot_chromatin_differential#
- mira.pl.plot_chromatin_differential(adata, genes=None, counts_layer=None, basis='X_umap', expr_pallete='Reds', lite_prediction_palette='viridis', differential_palette='coolwarm', height=3, aspect=1.5, differential_range=3, trim_lite_prediction=5, show_legend=True, size=1)#
Plot the expression, local accessibility prediction, chromatin differential, and LITE vs. NITE predictions for a given gene. This is the main tool with which one can visually investigate gene regulatory dynamics. These plots are most informative when looking at NITE-regulated genes.
Note
Before using this function, one must train RP models. Please refer to the LITE/NITE tutorial for instruction on training RP models and calculating NITE scores and chromatin differential.
- Parameters
- adataanndata.AnnData
AnnData object with chromatin_differential, LITE_prediction, and NITE_prediction layers.
- gene_nameslist[str], np.ndarray[str]
List of genes for which to plot chromatin differential panels.
- expr_palletestr, default = ‘Reds’
Pallete for plotting expression values.
- lite_prediction_palettestr, default = ‘viridis’
Palette for plotting LITE prediction values.
- differential_palettestr, default = ‘coolwarm’
Palette for plotting chromatin differential.
- heightfloat, default = 3
Height of plot panels
- aspectfloat, default = 1.5
Aspect ratio of plots
- differential_rangefloat, default = 3
Clamps range of color values for chromatin differential to +/- differential range.
- trim_lite_predictionfloat, default = 5
Clips the maximum LITE prediction value to mean + <time_lite_prediction> std, reducing the effect outliers have on plot colors.
- show_legendboolean, default = True
Show legend on plots.
- sizefloat, default = 1
Size of points.
- Returns
- matplotlib.pyplot.axes
Examples
>>> mira.pl.plot_chromatin_differential(adata, gene_names = ['LEF1','KRT23','WNT3','MT2'], ... show_legend = False)