plot_var_histo#

RAPDOR.plots.plot_var_histo(rapdorids, rapdordata: RAPDORData, color: str = 'rgb(138, 255, 172)', var_measure: str = 'ANOSIM R', bins: int = 10)#

Plots a histogram of a specified variability measure for a subset of proteins.

Parameters:
  • rapdorids (iterable) – A list or set of RAPDOR IDs specifying the proteins to include in the histogram.

  • rapdordata (RAPDORData) – A RAPDORData object containing the full dataset, including a .df DataFrame with variability measures.

  • color (str, optional) – Hex or named color used to fill the histogram bars. Defaults to DEFAULT_COLORS[“primary”].

  • var_measure (str, optional) – Column name in rapdordata.df to use for the histogram values. Defaults to “ANOSIM R”.

  • bins (int, optional) – Number of bins to use in the histogram. Defaults to 10.

Returns:

A Plotly histogram figure showing the distribution of the selected variability measure.

Return type:

plotly.graph_objects.Figure

Example

fig = plot_var_histo([“P12345”, “P67890”], rapdordata, var_measure=”ANOSIM R”, bins=20) fig.show()