center_peptide_batch_medians {proBatch} | R Documentation

## Median centering of the peptides (per batch median)

### Description

Median centering of the peptides (per batch median)

### Usage

    center_peptide_batch_medians(df_long, sample_annotation = NULL,
      sample_id_col = "FullRunName", batch_col = "MS_batch",
      feature_id_col = "peptide_group_label", measure_col = "Intensity")

### 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)
`sample_annotation` | data frame with sample ID, technical (e.g. MS batches) and biological (e.g. Diet) covariates
`sample_id_col` | name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)
`batch_col` | column in `sample_annotation` that should be used for batch comparison
`feature_id_col` | name of the column with feature/gene/peptide/protein ID used in the long format representation df_long. In the wide formatted representation data_matrix this corresponds to the row names.
`measure_col` | if `df_long` is among the parameters, it is the column with expression/abundance/intensity, otherwise, it is used internally for consistency

### Value

`df_long`-size long format data with batch-effect corrected with per-feature batch median centering in Intensity_normalized column

### Examples

    median_centered_proteome <- center_peptide_batch_medians(
    example_proteome, example_sample_annotation)

[Package proBatch version 1.0.0 Index]