plot_methylation_distribution
- pylluminator.visualizations.plot_methylation_distribution(samples: Samples, group_column: str | None = None, what: list[str] | str = 'hyper', annotation_column: str = 'cgi', orientation: str | None = 'h', custom_sheet: DataFrame | None = None, save_path: None | str = None) None
Plot the distribution of hyper/hypo methylated probes in the samples.
- Parameters:
samples (Samples) – samples with beta values already calculated
group_column (str | None) – column name in the sample sheet to categorize the data vertically. Default: None
what (list[str] | str) – the metric to plot. Can be ‘hypo’, ‘hyper’, ‘nas’ or ‘all’ for the 3 of them. Default: ‘hyper’
annotation_column (str) – column name of the probe_infos dataframe to use to annotation probes (cgi, promoter_or_body..). Default: ‘cgi’
orientation (str | None) – ‘h’ or ‘v’, orientation of the plot. Default: ‘h’
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
save_path (str | None) – if set, save the graph to save_path. Default: None
- Returns:
None