computeDiffStats: Compute differential statistics

View source: R/computeDiffStats.R

computeDiffStatsR Documentation

Compute differential statistics

Description

Compute differential statistics on the given contrasts, based on limma functions.

Usage

computeDiffStats(
  MSnSetObj,
  batchEffect = NULL,
  transform = TRUE,
  contrasts,
  trend = TRUE,
  robust = TRUE
)

Arguments

MSnSetObj

MSnSet; An object of class MSnSet

batchEffect

character; vector of variable(s) to correct for batch effect, Default : "SampleGroup"

transform

logical; apply log2 transformation to the raw intensitites

contrasts

character; named character vector of contrasts for differential statistics

trend

logical; TRUE or FALSE

robust

logical; TRUE or FALSE

Details

A statistical analysis for the identification of differentially regulated or bound proteins is carried out using limma based analysis. It uses linear models to assess differential expression in the context of multifactor designed experiments. Firstly, a linear model is fitted for each protein where the model includes variables for each group and MS run. Then, log2 fold changes between comparisions are estimated. Multiple testing correction of p-values are applied using the Benjamini-Hochberg method to control the false discovery rate (FDR).

In order to correct for batch effect, variable(s) can be defined. It should corresponds to a column name in pData(MSnSetObj). The default variable is "SampleGroup" that distinguish between two groups. If more variables are defined they are added to default.

Value

A list object containing three components: MSnSetObj of class MSnSet (see MSnSet-class) object), fittedLM (fitted linear model) and fittedContrasts. This object should be input into getContrastResults function to get differential results. See eBayes function of limma for more details on differential statistics.

Examples


data(human_anno)
data(exp3_OHT_ESR1)
MSnSet_data <- convertToMSnset(exp3_OHT_ESR1$intensities_qPLEX1,
                               metadata=exp3_OHT_ESR1$metadata_qPLEX1,
                               indExpData=c(7:16), 
                               Sequences=2, 
                               Accessions=6)
MSnset_norm <- groupScaling(MSnSet_data, scalingFunction=median)
MSnset_Pnorm <- summarizeIntensities(MSnset_norm, sum, human_anno)
contrasts <- c(tam.24h_vs_vehicle = "tam.24h - vehicle", 
               tam.6h_vs_vehicle = "tam.6h - vehicle")
diffstats <- computeDiffStats(MSnSetObj=MSnset_Pnorm, contrasts=contrasts)


crukci-bioinformatics/qPLEXanalyzer documentation built on Sept. 24, 2024, 1:13 a.m.