| scale_matrix | R Documentation |
Scales a gene expression matrix, optionally applies logarithmic transformation, and performs feature manipulation to remove problematic variables (e.g., genes with zero variance or missing values).
scale_matrix(matrix, log2matrix = TRUE, manipulate = TRUE)
matrix |
Numeric matrix with genes as rows and samples as columns. |
log2matrix |
Logical indicating whether to apply log2 transformation using [log2eset()]. Default is 'TRUE'. |
manipulate |
Logical indicating whether to perform feature manipulation to remove problematic features. Default is 'TRUE'. |
A scaled matrix (genes as rows, samples as columns).
Dongqiang Zeng
set.seed(123)
test_matrix <- matrix(
rlnorm(100),
ncol = 5,
dimnames = list(paste0("Gene", 1:20), paste0("Sample", 1:5))
)
eset2 <- scale_matrix(test_matrix, log2matrix = FALSE, manipulate = TRUE)
head(eset2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.