betas_heatmap
- pylluminator.visualizations.betas_heatmap(samples: Samples, apply_mask: bool = True, nb_probes: int = 100, figsize: tuple[float, float] = (10, 10), var: str | None | list[str] = None, custom_sheet: DataFrame | None = None, drop_na=True, save_path: None | str = None, row_factors: str | list[str] | None = None, row_legends: str | list[str] | None = '') None
Plot a heatmap of the probes with the most variable beta values, showing hierarchical clustering of the probes with dendrograms on the sides.
- Parameters:
samples (Samples) – samples to use for plotting
nb_probes (int) – number of probes to plot. Default: 100
figsize (tuple) – size of the plot. Default: (10, 10)
var (str | list[str] | None) – name of the variable to use for the columns of the heatmap. If None, will use the sample names. Default: None
custom_sheet (pandas.DataFrame | None) – a sample sheet to use. By default, use the samples’ sheet. Useful if you want to filter the samples to display. Default: None
drop_na (bool) – set to True to drop probes with any NA beta values. Note that if set to False, the rendered plot won’t show the hierarchical clusters. Default: True
save_path (str | None) – if set, save the graph to save_path. Default: None
row_factors (str | list[str] | None) – list of columns to show as color categories on the side of the heatmap. Must correspond to columns of the sample sheet. Default: None
row_legends (str | list[str] | None) – list of columns to generate a legend for. Set to None for no legends. Only work for columns also specified in row_factors. Default: ‘’ (generate all legends)
- Returns:
None