top_variance {geneExpression} R Documentation

keep only the top-N most variable gene feature rows of the expression matrix

Description

Usage

top_variance(x, n);

Arguments

x

a gene expression matrix (genes in rows, samples in columns). Low variance rows (constant or nearly constant expression) carry no information for the downstream co-expression network analysis, but they do inflate the O(n^2) correlation matrix computation and memory cost. [as Matrix]

n

the number of the top variance genes to keep. The rows are ranked by the sample variance (denominator n-1) of the expression values, and only the n highest ranked rows are kept. [as integer]

Details

this is the standard quality filter step of the R WGCNA workflow, usually applied after the batch normalization and before the co-expression network construction (for example before write_bicor or build_grn).

Authors

phenotype_kit

Value

a new expression matrix that contains only the top-N most variable gene feature rows (the original row order is preserved among the kept rows).

clr value class

Examples


[Package geneExpression version 1.0.0.0 Index]