calc_var_genes: Subset Genes

Description Usage Arguments Details Examples

View source: R/calc_var_genes.R

Description

This will select genes based on minimum expression, coefficient of variation, or by a preliminary PCA.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
calc_var_genes(
  input,
  method,
  assay = NULL,
  threshold = 1,
  minCells = 10,
  nComp = 10,
  log = F,
  fudge = F,
  fudge_val = 0.01
)

Arguments

input

the input sce

method

can either be "CV", "Malhanobis", or "Gini"

assay

if NULL will default to def_assay. Can provide a character assay argument.

threshold

UMI threshold for gene detection

minCells

number of cells expressed above threshold for a given gene

nComp

if method = PCA, the number of components to keep

log

whether or not to log scale the data

fudge

whether or not to add a fudge factor to the entire matrix

fudge_val

the value to add to matrix before transformation

Details

Genes will be first filtered by minimum expression selecting by subsetting to genes that are expressed above the threshold in more than minCells. If the method is CV, it will first subset the genes based on the expression cutoffs, then find the coefficient of variation across all genes. Next it will select the percentile of genes (cutoff) based on their coefficient of variation. The last method will perform PCA on the cells, and then look at the loadings of each gene. By finding genes that are off center (via malhanoobis distance) we can filter to include only genes that contribute significant variance to the data.

Examples

1
gene_subset <- subset_genes(input = sce, method = "PCA", assay = "counts")

kgellatl/SignalCell documentation built on Sept. 3, 2020, 8:45 a.m.