cellink.pl.manhattan#
- cellink.pl.manhattan(pvals_df, pval_col='pv_adj', chromosome_col='chrom', position_col='pos', point_size=10, significance_threshold=None, label_column=None, figsize=None, labelsize=None, titlesize=None, title=None, palette_mode='alternating', palette_alternating_colors=['#E24E42', '#008F95'], significant_hit_color='#D62728', palette=None, show=None, save=None, dpi=300, ax=None)#
Generate a Manhattan plot for genome-wide association p-values.
- Parameters:
pvals_df (pandas.DataFrame) – DataFrame containing p-values and variant genomic positions.
pval_col (str, default "pv_adj") – Column in
pvals_dfwith p-values.chromosome_col (str) – Column name for chromosome numbers (can be numeric or ‘X’, ‘Y’).
position_col (str) – Column name for base-pair positions.
point_size (int) – Size of points.
significance_threshold (float, default 5e-8) – Threshold for highlighting significant hits.
label_column (str or None) – Column to use for labeling significant points. Labels are shown above points.
figsize (tuple, optional) – Size of the figure. Defaults to matplotlib’s
figure.figsize.labelsize (int, optional) – Font size for axis labels. Defaults to matplotlib’s
axes.labelsize.titlesize (int, optional) – Font size for the title. Defaults to matplotlib’s
axes.titlesize.title (str, optional) – Title for the plot.
palette_mode ({'alternating', None}, default 'alternating') – Color mode for chromosomes if no
paletteis specified.palette_alternating_colors (list or np.ndarray, default ['#E24E42', '#008F95']) – List of two colors used to alternate chromosome coloring.
significant_hit_color (str, default "#D62728") – Color for highlighting significant hits.
palette (str or None) – Seaborn color palette name. Overrides
palette_modeif provided.show (bool or None) – Whether to display the plot. If None, shows the plot only when
axis not provided.save (str or bool or None) – File path to save the plot. If True, saves as “manhattan.png”.
dpi (int, default 300) – Resolution (dots per inch) of the saved figure.
ax (matplotlib.axes.Axes or None) – Optional matplotlib Axes object to plot into.
- Return type:
- Returns:
matplotlib.figure.Figure The resulting Manhattan plot figure.
- Raises:
ValueError – If both
paletteandpalette_modeare specified simultaneously.