plot_betas_distribution
- pylluminator.visualizations.plot_betas_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, hypo_threshold: float = 0.4, hyper_threshold: float = 0.6, probe_ids: list[str] | None = None, save_path: None | str = None) None
Plot the distribution of hyper (beta > 0.6) / hypo (beta < 0.4) 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’, ‘mid’, ‘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
hypo_threshold (float) – max beta value to consider a probe hypo methylated. Default: 0.4
hyper_threshold (float) – min beta value to consider a probe hyper methylated. Default: 0.6
probe_ids (list[str] | None) – list of probes to select. Default None
save_path (str | None) – if set, save the graph to save_path. Default: None
- Returns:
None