Dna.run_pca

Dna.run_pca(attribute, components, output_label='pca', show_plot=False, **kwargs)

Principal component analysis

Adds output_label to the row attributes.

Parameters
attributestr

The attribute to be used for PCA. Uses _Assay.get_attribute() to retrieve the values constrained by row.

componentsint

The number of PCA components to reduce to.

output_labelstr, default PCA_LABEL

The name of the row attribute to store the data in.

show_plotbool

Show the plot for the explained variance by the PCAs.

kwargsdict

Passed to the PCA.

Raises
ValueError

When both layer and attribute are provided. Only one is permitted at a time.