feature_select_PCA {clustifyr} | R 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
    )

[Package clustifyr version 1.0.0 Index]