feature_select_PCA: Returns a list of variable genes based on PCA

View source: R/utils.R

feature_select_PCAR Documentation

Returns a list of variable genes based on PCA

Description

Extract genes, i.e. "features", based on the top loadings of principal components formed from the bulk expression data set

Usage

feature_select_PCA(
  mat = NULL,
  pcs = NULL,
  n_pcs = 10,
  percentile = 0.99,
  if_log = TRUE
)

Arguments

mat

Expression matrix. Rownames are genes, colnames are single cell cluster name, and values are average single cell expression (log transformed).

pcs

Precalculated pcs if available, will skip over processing on mat.

n_pcs

Number of PCs to selected gene loadings from. See the explore_PCA_corr.Rmd vignette for details.

percentile

Select the percentile of absolute values of PCA loadings to select genes from. E.g. 0.999 would select the top point 1 percent of genes with the largest loadings.

if_log

whether the data is already log transformed

Value

vector of genes

Examples

feature_select_PCA(
    cbmc_ref,
    if_log = FALSE
)

rnabioco/clustifyr documentation built on Nov. 9, 2023, 8:01 p.m.