smftools.plotting.plotting_utils#
Functions
|
Format a barplot with consistent axes and labels. |
|
Convert metadata columns to RGB colors without invoking pandas Categorical.map (MultiIndex-safe, category-safe). |
|
Fraction methylated per column. |
|
Compute normalized column means for a matrix. |
- smftools.plotting.plotting_utils.normalized_mean(matrix, *, ignore_nan=True)#
Compute normalized column means for a matrix.
- smftools.plotting.plotting_utils.methylation_fraction(matrix, *, ignore_nan=True, zero_is_valid=False)#
Fraction methylated per column. Methylated = 1 Valid = finite AND not 0 (unless zero_is_valid=True)
- Return type:
- smftools.plotting.plotting_utils.clean_barplot(ax, mean_values, title, *, y_max=1.0, y_label='Mean', y_ticks=None)#
Format a barplot with consistent axes and labels.
- Parameters:
- smftools.plotting.plotting_utils.make_row_colors(meta)#
Convert metadata columns to RGB colors without invoking pandas Categorical.map (MultiIndex-safe, category-safe).
- Return type:
DataFrame