manhattan_plot_dmr
- pylluminator.visualizations.manhattan_plot_dmr(data_to_plot: DataFrame, contrast: str, chromosome_col='chromosome', x_col='segment_start', y_col='p_value', annotation: Annotations | None = None, annotation_col='genes', log10=True, draw_significance=True, figsize: tuple[float, float] = (10, 8), medium_threshold: float | None = None, high_threshold: float | None = None, title: None | str = None, save_path: None | str = None)
Display a Manhattan plot of the given DMR data, designed to work with the dataframe returned by get_dmrs()
- Parameters:
data_to_plot (pandas.DataFrame) – dataframe to use for plotting. Typically, a dataframe returned by get_dmrs()
contrast (str) – name of the contrast from DMP calculation to use.
chromosome_col (str) – the name of the chromosome column in the data_to_plot dataframe. Default: chromosome
x_col (str) – name of the column to use for X axis, start position of the probe/bin. Default: start
y_col (str) – the name of the value column in the data_to_plot dataframe. Default: p_value
annotation (Annotations | None) – Annotation data to use to annotation significant probes. No annotation if set to None. Default: None
annotation_col (str | None) – the name of a column used to write annotation on the plots for data that is above the significant threshold. Must be a column in the Annotation data. Default: None
medium_threshold (float | None) – set the threshold used for displaying annotation (and significance line if raw_significance is True). If None, takes the value of the 100th probe. Default: None
high_threshold (float | None) – set the threshold for the higher significance line (drawn if draw_significance is True). If None, takes the value of the 20th probe. Default: None
log10 (bool) – apply -log10 on the value column. Default: True
draw_significance (bool) – draw p-value significance lines (at 1e-05 and 5e-08). Default: False
figsize (tuple) – size of the figure. Default: (10, 8)
title (str | None) – custom title for the plot. Default: None
save_path (str | None) – if set, save the graph to save_path. Default: None
- Returns:
nothing