|
scran_pca
Principal component analysis for single-cell data
|
Results of simple_pca().
More...
#include <simple_pca.hpp>
Public Attributes | |
| EigenMatrix_ | components |
| EigenVector_ | variance_explained |
| EigenVector_::Scalar | total_variance = 0 |
| EigenMatrix_ | rotation |
| EigenVector_ | center |
| std::optional< EigenVector_ > | scale |
| irlba::Metrics | metrics |
Results of simple_pca().
| EigenMatrix_ | A floating-point column-major Eigen::Matrix class. |
| EigenVector_ | A floating-point Eigen::Vector class. |
| EigenVector_ scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::center |
Centering vector. Each entry corresponds to a gene (i.e., row of the input matrix) and contains the mean value of that gene. If the input matrix has no cells, the mean is set to zero for all genes.
| EigenMatrix_ scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::components |
Matrix of principal component scores. By default, each row corresponds to a PC while each column corresponds to a cell in the input matrix. If SimplePcaOptions::transpose = false, rows are cells instead.
The number of PCs is the smaller of SimplePcaOptions::number and min(NR, NC) - 1, where NR and NC are the number of rows and columns, respectively, of the input matrix.
| irlba::Metrics scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::metrics |
Metrics for IRLBA, including whether the algorithm converged and the number of iterations/multiplications required.
| EigenMatrix_ scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::rotation |
Rotation matrix. Each row corresponds to a feature while each column corresponds to a PC. The number of PCs is as described for SimplePcaResults::components.
| std::optional<EigenVector_> scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::scale |
Scaling vector, only returned if SimplePcaOptions::scale = true. Each entry corresponds to a gene (i.e., row of the input matrix) and contains the scaling factor used to divide the feature values if SimplePcaOptions::scale = true. This is usually the sample standard deviation of that gene. For genes with zero variance, the scaling factor is set to 1 to avoid non-finite values upon scaling. For input matrices with fewer than 2 cells, the scaling factor is set to 1 for all genes.
| EigenVector_::Scalar scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::total_variance = 0 |
Total variance of the dataset (possibly after scaling, if SimplePcaOptions::scale = true). This can be used to divide variance_explained to obtain the percentage of variance explained.
| EigenVector_ scran_pca::SimplePcaResults< EigenMatrix_, EigenVector_ >::variance_explained |
Variance explained by each PC. Each entry corresponds to a column in components and is in decreasing order. The number of PCs is as described for SimplePcaResults::components.