scran
C++ library for basic single-cell RNA-seq analyses
Loading...
Searching...
No Matches
Public Attributes | List of all members
scran::MultiBatchPca::Results Struct Reference

Container for the PCA results. More...

#include <MultiBatchPca.hpp>

Public Attributes

Eigen::MatrixXd pcs
 
Eigen::VectorXd variance_explained
 
double total_variance = 0
 
Eigen::MatrixXd rotation
 
Eigen::MatrixXd center
 
Eigen::VectorXd scale
 

Detailed Description

Container for the PCA results.

Instances should be constructed by the MultiBatchPca::run() methods.

Member Data Documentation

◆ pcs

Eigen::MatrixXd scran::MultiBatchPca::Results::pcs

Matrix of principal components. By default, each row corresponds to a PC while each column corresponds to a cell in the input matrix. If set_transpose() is set to false, rows are cells instead. The number of PCs is determined by set_rank().

◆ variance_explained

Eigen::VectorXd scran::MultiBatchPca::Results::variance_explained

Variance explained by each PC. Each entry corresponds to a column in pcs and is in decreasing order.

Note that the absolute magnitude of the variance is quite difficult to interpret due to the weighting. We suggest dividing by total_variance and working with the proportion of variance explained instead.

◆ total_variance

double scran::MultiBatchPca::Results::total_variance = 0

Total variance of the dataset (possibly after scaling, if set_scale() is set to true). This can be used to divide variance_explained to obtain the percentage of variance explained.

◆ rotation

Eigen::MatrixXd scran::MultiBatchPca::Results::rotation

Rotation matrix, only returned if MultiBatchPca::set_return_rotation() is true. Each row corresponds to a feature while each column corresponds to a PC. The number of PCs is determined by set_rank(). If feature filtering was performed, the number of rows is equal to the number of features remaining after filtering.

◆ center

Eigen::MatrixXd scran::MultiBatchPca::Results::center

Centering matrix, only returned if MultiBatchPca::set_return_center() is true.

If MultiBatchPca::set_block_policy() is MultiBatchPca::BlockPolicy::RESIDUAL_ONLY or MultiBatchPca::BlockPolicy::WEIGHTED_RESIDUAL, the number of columns is equal to the number of unique blocking levels. Each row corresponds to a row in the matrix and each column corresponds to a block, such that each entry contains the mean for a particular feature in the corresponding block.

Otherwise, the number of columns is equal to 1. Each row corresponds to a row in the matrix and contains the (weighted) grand mean for that feature across all blocks.

If feature filtering was performed, the length is equal to the number of features remaining after filtering.

◆ scale

Eigen::VectorXd scran::MultiBatchPca::Results::scale

Scaling vector, only returned if MultiBatchPca::set_return_center() is true. Each entry corresponds to a row in the matrix and contains the scaling factor used to divide the feature values if MultiBatchPca::set_scale() is true. If feature filtering was performed, the length is equal to the number of features remaining after filtering.


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