plot_dimension_reduction#

RAPDOR.plots.plot_dimension_reduction(rapdordata: RAPDORData, colors: Iterable[str] = None, highlight: Iterable[Any] = None, highlight_color: str = None, show_cluster: bool = False, dimensions: int = 2, marker_max_size: int = 40, second_bg_color: str = 'white', bubble_legend_color: str = 'black', legend_start: float = 0.2, legend_spread: float = 0.1, title_col: str = None, cutoff_range: Tuple[float, float] = None, cutoff_type: str = None, show_lfc: bool = False)#

Plots a bubble plot using relative distribution change, relative fraction shift and the Mean Distance

Parameters:
  • rapdordata (RAPDORData) – A RAPDORData object where distances are calculated and the array is normalized already.

  • colors (Iterable[str]) – An iterable of color strings to use for plotting

  • highlight (Iterable[Any]) – RAPDORids to highlight in the plot

  • highlight_color (str) – html color used to highlight selected bubbles

  • show_cluster (bool) – If set to true it will show clusters in different colors. (Only works if rapdordata is clustered)

  • dimensions (int) – Either 2 or 3. 2 will produce a plot where the mean distance axis is represented via a marker size. If 3, it will add another axis and return a three-dimensional figure

  • marker_max_size (int) – maximum marker size for highest mean distance (This has no effect if dimensions is 3)

  • second_bg_color (str) – changes background color of the bubble legend (This has no effect if dimensions is 3)

  • bubble_legend_color (str) – color of the bubbles and text in the bubble legend (This has no effect if dimensions is 3)

  • legend_start (float) – start position of the bubble legend in relative coordinates (This has no effect if dimensions is 3)

  • legend_spread (float) – spread of the bubble legend (This has no effect if dimensions is 3)

  • title_col (str) – Will display names from that column in the rapdordata for highlighted proteins (This has no effect if dimensions is 3)

  • cutoff_type (str) – column in the dataframe of RAPDORData used for cutoff. Muste be numerical

  • cutoff_range (Iterable[float]) – uses index one as lower bound and index two as upper bound for data to display in the plot

  • show_lfc (bool) – Shows lfs via a colorscale and the bubble colors. No effect if dimension is 3

Returns: go.Figure()