Computing Dynamic SWATH Windows"

Introduction

Function optimizes Extraction windows for DIA/SWATH so we have the same number of precursor per window. This optimization is based on spectral library data or non redundant .blib files (Bibliospec).

Prerequisites

library(prozor)

Constant with method

data("masses")
cdsw <- Cdsw(masses , nbins = 25, digits = 1)
cdsw$plot()
knitr::kable(cdsw$asTable())
constError <- cdsw$error()

Classical Method based on quantile

Same number of MS1 precursors in each window

cdsw$quantile_breaks()
cdsw$plot()
knitr::kable(cdsw$asTable())
quantileError <- cdsw$error()

Adjust windows

Using this method the window start and end is shifted to a mass range with as few MS1 peaks as possible.

knitr::kable(cdsw$optimizeWindows(maxbin = 10, plot = TRUE) )

Dynamic Swath Windows with Constraints.

cdsw$sampling_breaks(maxwindow = 100,plot = TRUE)
cdsw$plot()
knitr::kable(cdsw$asTable())
knitr::kable(cdsw$optimizeWindows(maxbin = 10, plot = TRUE) )
mixedError <- cdsw$error()

Benchmarking of the methods.

We compare the optimal number of MS1 peaks per SWATH window (same in each window) with the numbers obtained by using all of the 3 methods implemented.

barplot(c(const = constError$score1, quantile = quantileError$score1, mixed = mixedError$score1),ylab = "Manhattan distance")
barplot(c(const = constError$score2, quantile = quantileError$score2, mixed = mixedError$score2),ylab = "Euclidean distance")

We can see that Method 3 has a relatively small error although it is able to fulfill constraints such as maximum window size.

Session info

sessionInfo()


Try the prozor package in your browser

Any scripts or data that you put into this service are public.

prozor documentation built on Dec. 11, 2021, 9:51 a.m.