| log2eset | R Documentation |
Determines whether a gene expression matrix requires log2 transformation based on the distribution of values, and applies it if necessary. This is useful for automatically detecting raw counts or linear-scale data that should be log-transformed for downstream analysis.
log2eset(eset)
eset |
Numeric matrix. Gene expression data with genes as rows and samples in columns. |
Numeric matrix. Log2-transformed gene expression data (if transformation was needed), or the original data otherwise.
set.seed(123)
eset <- matrix(rnorm(1000, mean = 10, sd = 2), nrow = 100, ncol = 10)
rownames(eset) <- paste0("Gene", 1:100)
colnames(eset) <- paste0("Sample", 1:10)
eset_transformed <- log2eset(eset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.