recalculateIntensity: Calculates area of peaks in peakTable

View source: R/peak_area.R

recalculateIntensityR Documentation

Calculates area of peaks in peakTable

Description

For the give peak boundary in peakTable, the function extracts raw chromatograms and recalculate intensities.

Usage

recalculateIntensity(
  peakTable,
  dataPath = ".",
  oswMerged = TRUE,
  params = paramsDIAlignR()
)

Arguments

peakTable

(data-table) usually an output of alignTargetedRuns. Must have these columns: precursor, run, intensity, leftWidth, rightWidth.

dataPath

(string) path to xics and osw directory.

oswMerged

(logical) TRUE if merged file from pyprophet is used.

params

(list) parameters are entered as list. Output of the paramsDIAlignR function.

Value

(data-table)

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

ORCID: 0000-0003-3500-8152

License: (c) Author (2020) + GPL-3 Date: 2020-05-28

See Also

alignTargetedRuns, calculateIntensity

Examples

library(data.table)
peakTable <- data.table(precursor = c(1967L, 1967L, 2474L, 2474L),
                   run = rep(c("hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt",
                   "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"), 2),
                   intensity = c(186.166, 579.832, 47.9525, 3.7413),
                   leftWidth = c(5001.76, 5025.66, 6441.51, 6516.6),
                   rightWidth = c(5076.86, 5121.25, 6475.65, 6554.2))
dataPath <- system.file("extdata", package = "DIAlignR")
params <- paramsDIAlignR()
params$smoothPeakArea <- TRUE
recalculateIntensity(peakTable, dataPath, params = params)
peakTable <- data.table(precursor = c(1967L, 1967L, 2474L, 2474L),
                   run = rep(c("hroest_K120808_Strep10%PlasmaBiolRepl1_R03_SW_filt",
                   "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"), 2),
                   intensity = list(NA, NA, NA, NA),
                   leftWidth = c(5001.76, 5025.66, 6441.51, 6516.6),
                   rightWidth = c(5076.86, 5121.25, 6475.65, 6554.2))
params$transitionIntensity <- TRUE
recalculateIntensity(peakTable, dataPath, params = params)

shubham1637/DIAlignR documentation built on March 29, 2023, 8:45 p.m.