limma_wrapper: Perform linear regression with limma

View source: R/stats_differential_abundance.R

limma_wrapperR Documentation

Perform linear regression with limma

Description

Please refer to the vignette on custom limma models at the MS-DAP GitHub repository for a walk-through with examples.

Usage

limma_wrapper(
  x = protein_data,
  npep = NULL,
  model_matrix,
  contrasts,
  limma_block_variable = NULL,
  ebayes_trend = FALSE,
  ebayes_robust = FALSE,
  deqms = TRUE,
  return_table = TRUE
)

Arguments

x

result from get_protein_matrix(... , include_npep = TRUE). Alternatively, a protein log2 intensity matrix (in this case, also provide the npep parameter if you want to apply DEqMS)

npep

optionally, the number of peptides-per-protein for each row in input protein matrix. Only needed when providing a matrix for parameter x (i.e. you can leave this NULL when x is output from get_protein_matrix(... , include_npep = TRUE))

model_matrix

result from stats::model.matrix()

contrasts

contrasts defined with limma::makeContrasts() that should be extracted from the linear regression model

limma_block_variable

option passed to limma::lmFit() to fit block design. To skip (default), set NULL. Otherwise, this should be a character vector of the same length as nrow(model_matrix) so it describes a block/group per respective sample in the model/design matrix

ebayes_trend

option passed to limma::eBayes(). Defaults to FALSE (same as limma default)

ebayes_robust

option passed to limma::eBayes(). Defaults to FALSE (same as limma default)

deqms

apply DEqMS? Defaults to TRUE. If FALSE, returns limma::eBayes() result as-is

return_table

if TRUE, the default, returns a table with protein_id, log2fc, pvalue, adjusted pvalue, contrast (i.e. this is the output from MS-DAP function limma_fit_extract_stats()). If FALSE, returns the limma fit object as-is


ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.