scran_pca
Principal component analysis for single-cell data
Loading...
Searching...
No Matches
scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ > Struct Template Reference

Results of blocked_pca(). More...

#include <blocked_pca.hpp>

Public Attributes

EigenMatrix_ components
 
EigenVector_ variance_explained
 
EigenVector_::Scalar total_variance = 0
 
EigenMatrix_ rotation
 
EigenMatrix_ center
 
std::optional< EigenVector_ > scale
 
irlba::Metrics metrics
 

Detailed Description

template<typename EigenMatrix_, typename EigenVector_>
struct scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >

Results of blocked_pca().

Template Parameters
EigenMatrix_A floating-point column-major Eigen::Matrix class.
EigenVector_A floating-point Eigen::Vector class.

Member Data Documentation

◆ center

template<typename EigenMatrix_ , typename EigenVector_ >
EigenMatrix_ scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >::center

Centering matrix. Each row corresponds to a block and each column corresponds to a gene (i.e., row of the input matrix). Each entry contains the mean of a particular gene in the corresponding block. For empty blocks, the mean for all genes is set to zero.

◆ components

template<typename EigenMatrix_ , typename EigenVector_ >
EigenMatrix_ scran_pca::BlockedPcaResults< 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 BlockedPcaOptions::transpose = false, rows are cells instead.

The number of PCs is the smaller of BlockedPcaOptions::number and min(NR, NC) - 1, where NR and NC are the number of rows and columns, respectively, of the input matrix.

◆ metrics

template<typename EigenMatrix_ , typename EigenVector_ >
irlba::Metrics scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >::metrics

Metrics for IRLBA, including whether the algorithm converged and the number of iterations/multiplications required.

◆ rotation

template<typename EigenMatrix_ , typename EigenVector_ >
EigenMatrix_ scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >::rotation

Rotation matrix. Each row corresponds to a gene (i.e., row of the input matrix) while each column corresponds to a PC. The number of PCs is as described for BlockedPcaResults::components.

◆ scale

template<typename EigenMatrix_ , typename EigenVector_ >
std::optional<EigenVector_> scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >::scale

Scaling vector, only returned if BlockedPcaOptions::scale = true. Each entry corresponds to a gene (i.e., row of the input matrix) and contains the scaling factor used to divide that gene's values if BlockedPcaOptions::scale = true. This is usually the weighted sum of the per-block sample standard deviation of that gene. For genes with zero variance in all blocks, 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.

◆ total_variance

template<typename EigenMatrix_ , typename EigenVector_ >
EigenVector_::Scalar scran_pca::BlockedPcaResults< EigenMatrix_, EigenVector_ >::total_variance = 0

Total variance of the dataset (possibly after scaling, if BlockedPcaOptions::scale = true). This can be used to divide variance_explained to obtain the percentage of variance explained.

◆ variance_explained

template<typename EigenMatrix_ , typename EigenVector_ >
EigenVector_ scran_pca::BlockedPcaResults< 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 BlockedPcaResults::components.


The documentation for this struct was generated from the following file: