Skip to contents

The number of PCs and the selection strategy is controlled:

  • For single-sample analysis, via PCA_SELECTION_METHOD and PCA_FORCED_PCS parameters in 02_norm_clustering.yaml.

  • For integration analysis, via pca_selection_method and pca_forced_pcs subparameters of INTEGRATION_METHODS parameter in 01_integration.yaml.

Usage

get_pca_selected_pcs(
  sce_pca,
  pca_elbow_pcs,
  pca_gene_var_pcs,
  pca_selection_method = c("elbow", "technical_noise", "forced"),
  pca_forced_pcs = NULL
)

Arguments

sce_pca

A SingleCellExperiment object with calculated PCA.

pca_elbow_pcs

A numeric scalar: number of PCs selected by elbow point strategy.

pca_gene_var_pcs

A numeric scalar: number of PCs selected by technical noise strategy.

pca_selection_method

A character scalar: final selection strategy.

pca_forced_pcs

A numeric scalar: constant number of PCs defined in config file.

Value

A modified SingleCellExperiment object:

  • The full PCA matrix in "pca_all" slot of reducedDim().

  • The subsetted PCA matrix in "pca" slot of reducedDim().

  • New items added to metadata(): pca_selection_method, pca_selected_pcs