flotilla.Study.plot_pca

Study.plot_pca(data_type='expression', x_pc=1, y_pc=2, sample_subset=None, feature_subset=None, title='', featurewise=False, plot_violins=False, show_point_labels=False, reduce_kwargs=None, color_samples_by=None, bokeh=False, most_variant_features=False, std_multiplier=2, scale_by_variance=True, **kwargs)

Performs DataFramePCA on both expression and splicing study_data

Parameters:

data_type : str

One of the names of the data types, e.g. “expression” or “splicing” (default “expression”)

x_pc : int, optional

Which principal component to plot on the x-axis (default 1)

y_pc : int, optional

Which principal component to plot on the y-axis (default 2)

sample_subset : str or None

Which subset of the samples to use, based on some phenotype column in the experiment design data. If None, all samples are used. (default None)

feature_subset : str or None

Which subset of the features to used, based on some feature type in the expression data (e.g. “variant”). If None, all features are used. (default None)

title : str, optional

Title of the reduced space plot (default ‘’)

featurewise : bool, optional

If True, the features are reduced on the samples, and the plotted points are features, not samples. (default False)

plot_violins : bool

Whether or not to make the violinplots of the top features. This can take a long time, so to save time you can turn it off if you just want a quick look at the PCA. (default False)

show_point_labels : bool, optional

Whether or not to show the labels of the points. If this is samplewise (default), then this labels the samples. If this is featurewise, then this labels the features. (default False)

reduce_kwargs : dict, optional

Keyword arguments to the reducer (default None)

color_samples_by : str, optional

Instead of coloring the samples by their phenotype, color them by this column in the metadata. (default None)

bokeh : bool, optional

If True, plot a javascripty/interactive bokeh plot instead of a static printable figure (default False)

most_variant_features : bool, optional

If True, then only take the most variant of the provided features. The most variant are determined by taking the features whose variance is ``std_multiplier``standard deviations away from the mean feature variance (default False)

std_multiplier : float, optional

If most_variant_features is True, then use this as a cutoff for the minimum variance of a feature to be included (default 2)

scale_by_variance : bool, optional

If True, then scale the x- and y-axes by the explained variance ratio of the principal component dimensions. Only valid for PCA and its variations, not for NMF or tSNE. (default True)

kwargs : other keyword arguments

All other keyword arguments are passed to DecomopsitionViz.plot()

Olga B. Botvinnik is funded by the NDSEG fellowship and is a NumFOCUS John Hunter Technology Fellow.
Michael T. Lovci was partially funded by a fellowship from Genentech.
Partially funded by NIH grants NS075449 and HG004659 and CIRM grants RB4-06045 and TR3-05676 to Gene Yeo.