transform_raw_data {proBatch} | R Documentation

## Functions to log transform raw data before normalization and batch correction

### Description

Functions to log transform raw data before normalization and batch correction

Log transformation of the data

"Unlog" transformation of the data to pre-log form (for quantification, forcing log-transform)

### Usage

    log_transform_df(df_long, log_base = 2, offset = 1, measure_col = "Intensity")

    unlog_df(df_long, log_base = 2, offset = 1, measure_col = "Intensity")

    log_transform_dm(data_matrix, log_base = 2, offset = 1)

    unlog_dm(data_matrix, log_base = 2, offset = 1)

### Arguments

`df_long` | data frame where each row is a single feature in a single sample. It minimally has a `sample_id_col`, a `feature_id_col` and a `measure_col`, but usually also an `m_score` (in OpenSWATH output result file). See `help("example_proteome")` for more details.
`log_base` | base of the logarithm for transformation
`offset` | small positive number to prevent 0 conversion to `-Inf`
`measure_col` | if `df_long` is among the parameters, it is the column with expression/abundance/intensity; otherwise, it is used internally for consistency.
`data_matrix` | features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. See "example_proteome_matrix" for more details (to call the description, use `help("example_proteome_matrix")`)

### Value

'log_transform_df()' returns `df_long`-size data frame, with `measure_col` log transformed; with old value in another column called "beforeLog_intensity" if "intensity" was the value of `measure_col`; 'log_transform_dm()' returns `data_matrix` format matrix

### Examples

    log_transformed_df <- log_transform_df(example_proteome)

    log_transformed_matrix <- log_transform_dm(example_proteome_matrix,
    log_base = 10, offset = 1)

[Package proBatch version 1.6.0 Index]