var_filter_counts: Filter low-variance genes

Description Usage Arguments Details Value

View source: R/var_filter_counts.R

Description

This function filters a counts object, keeping the n_keep genes with the highest variance.

Usage

1
2
3
var_filter_counts(
  counts, counts, n_keep=8000, genes="rows",
  log2_transform=FALSE)

Arguments

counts

a matrix or data frame of gene expression counts.

n_keep

integer, the maximum number of genes to retain

genes

character string, the dimension of counts containing the genes. Accepted values are "rows", "columns", and partial matches. Defaults to "rows"

log2_transform

boolean, whether to log2 transform the counts prior to variance filtering. If the counts have not already been transformed, should be set to TRUE. Defaults to FALSE.

Details

Variance is calculated for all genes. Genes are then ranked by this variance, and the n_keep genes with highest variance are retained.

Value

a matrix or data frame with the same number of samples as counts, but possibly with fewer genes.


mjdufort/countSubsetNorm documentation built on Nov. 7, 2019, 6:37 p.m.