subset_genes: Subset Genes

Description Usage Arguments Details Examples

View source: R/subset_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
subset_genes(
  input,
  method,
  threshold = 1,
  minCells = 10,
  nComp = 10,
  cutoff = 0.85,
  log = F,
  output = "simple",
  fudge = F
)

Arguments

input

the input ex_sc.

method

can either be "Expression", CV", or "PCA".

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

cutoff

the percentile of genes to keep

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 = exprs(ex_sc_example), method = "PCA", threshold = 3, minCells = 30, nComp = 15, cutoff = 0.75)

kgellatl/SignallingSingleCell documentation built on Dec. 29, 2021, 4:12 p.m.