log_cpm {rsynthbio}R Documentation

Log CPM Transformation

Description

Transforms raw counts expression data into log1p(CPM) (Counts Per Million). This is a common normalization method for gene expression data that accounts for library size differences and applies a log transformation to reduce the effect of outliers.

Usage

log_cpm(expression)

Arguments

expression

A data.frame containing raw counts expression data.

Value

A data.frame containing log1p(CPM) transformed data.

Examples

# Create a sample expression matrix with raw counts
raw_counts <- data.frame(
  gene1 = c(100, 200, 300),
  gene2 = c(50, 100, 150),
  gene3 = c(10, 20, 30)
)

# Transform to log CPM
log_cpm_data <- log_cpm(raw_counts)
print(log_cpm_data)

[Package rsynthbio version 2.0.0 Index]