plot_sample_pca#

RAPDOR.plots.plot_sample_pca(rapdordata: RAPDORData, plot_dims: Tuple[int, int] | Tuple[int, int, int], ntop=None, summarize_fractions: bool = True, use_raw: bool = False, colors=None)#

Creates PCA plot of the samples of an RAPDORdata object.

It can either produce a 3D or 2D PCA plot depending on the number of dimensions specified in plot_dims If summarize_fractions is True it will flatten the fraction dimension. If it is set to false it will treat each replicate, treatment, fraction combination as a separate sample. :param rapdordata: A RAPDORData object :type rapdordata: RAPDORData :param plot_dims: The principal components to plot. Either a Tuple of

three or two components. Three results in a 3D and two in a 2D plot.

Parameters:
  • ntop (int or float) – use the n top entries regarding their variance if its an int. If it is a float it uses that percentage of the data.

  • use_raw (bool) – uses raw values instead of normalized values.

  • summarize_fractions (bool) – flattens the fractions if True only displaying one point per sample and treatment.

  • colors (Iterable[str]) – Iterable of color values

Returns: go.Figure()