The basic definition of a baseline defines it as a broad trend that causes the true signal to “drift” along the y-axis. For example, a continuous extra energy reading caused by heat developed in sensor plate over time. This component has very low frequency, and should not change much in a 5 THz range.But you already knew that right? You came here to find out **which baseline algorithm is the best**.

In this article we compare 3 known algorithms for baseline correction in mass spec, namely:

- Thresholding Algorithm
- TopHat Algorithm
- Asymmetric Least Square Smoothing Algorithm (AsLSS)

At the end of the article, we compare the three head to head on **2 major accuracy parameters involving 4 real world scenarios,** but first let us define these algorithms in brief.

This algorithm was used by us on our tool – **El-MAVEN**, to define the threshold baseline i.e. to filter the noise. It was a part of the original Maven project written by Eugene Melamud and is defined using two parameters:

**Drop the top x% intensities from the chromatogram:**The percentage intensity defined here is removed before calculating the baseline. This value has to be set higher in case of higher noise in the data**Baseline smoothing:**This defines the number of scans used for fitting in the smoothing algorithm

However, there were some challenges that we faced with this baseline, which led us to the discovery of other options mentioned below. These drawbacks were:

- The baseline calculated was often
**inaccurate**i.e. baseline was affected by the adjacent peak intensity - A
**global fit**of the baseline was observed i.e. the baseline was defined for the entire EIC and hence had to be changed for particular peak groups or metabolites

This is a very different approach of baseline correction compared to AsLSS, where an ideal model for baseline behaviour is obeyed and reflected in the algorithm. The TopHat filter is a well known operation used in morphological image analysis but can be applied to any kind of uniformly-distributed signal to obtain its baseline reduced “true” form. It features:

- Only 1 parameter (s i.e. the structuring element of the morphological filter)
- In terms of computational performance it performs better than both AsLSS and Threshold algorithms
- It offers more aggressive calculation but the output is not as ideal as AsLSS

The Asymmetric Least Square Smoothing Algorithm (AsLSS), uses smoothing (determined by *λ**)* to give a slowly varying trend of the signal. AsLS has an “asymmetry” (denoted by ** p**) parameter that can be used to favour only one type of peak – either positive or negative.

- It can be tuned using only two parameters (
for smoothness and*λ*for asymmetry)*p* - It does not suffer from the global fitting issue as the thresholding algorithm does
- It does a more accurate calculation of baseline as compared to thresholding and TopHat algorithms

Here is the part you’ve been waiting for. The accuracy comparison of the Thresholding Algorithm, AsLSS Algorithm and TopHat has been shared below.

True Baseline was determined by manually curating EICs with the correct baseline and different peak patterns as mentioned in the cases below. The true baselines were recorded and drift was then added to each of these EICs.

- The baseline was calculated with the added drifts for 4420 runs using thresholding, AsLSS, and TopHat algorithms. The R Squared value was calculated for each run in comparison to the true baseline. Finally, the mean of these R Squared Values was recorded.
- This value ranges between [0,1].
**Closer the value to 1, better is the fit.**

- The area was calculated with the true baseline and corrected baselines for 1000 runs in each category (multiple peaks in EIC, two close peaks, two close peaks with significant intensity difference, noisy data).
- The relative difference in area is calculated using the formula for each run as below:

- The mean of the relative area difference is calculated for 1000 runs within each category.
- We would want this mean relative area difference to be as low as possible to ensure the area of the peak obtained with the corrected baseline is close to the area of the peak obtained with the true baseline.

FeaturesThreshold AlgorithmAsLSS AlgorithmTopHatMean of R Squared Value0.74220.96580.9528Mean relative area difference when there are **two or more peaks**19.148.0619.22Mean relative area difference when **two peaksare close to each other**18.8012.1121.67Mean relative area difference when **two close peaks havea significant difference in intensity**29.5621.8327.89Mean relative area difference when there is a **noisy EICwith distinct peaks**35.154.2113.32

- The R Squared Value observed for AsLSS Algorithm was the best. Hence we can say, the goodness of the fit was the better as compared to TopHat and Thresholding Algorithm.
- In the case of
**two or more peaks,**the mean relative area difference observed was lowest for AsLSS Algorithm. The mean relative area difference observed for Thresholding Algorithm was the second lowest while TopHat showed the highest deviation. - In the case of
**two close peaks**, the mean relative area difference observed was lowest for AsLSS Algorithm. The mean relative area difference observed for Thresholding Algorithm was the second lowest while TopHat showed the highest deviation. - In the case of
**two close peaks with significant intensity difference**, the mean relative area difference observed was lowest for AsLSS Algorithm. The mean relative area difference observed for TopHat was the second lowest while Thresholding Algorithm showed the highest deviation. - In the case of
**noisy EIC**, the mean relative area difference observed was lowest for AsLSS Algorithm. The mean relative area difference observed for TopHat was the second lowest while Thresholding Algorithm showed the highest deviation.

The verdict is out and we have a clear winner – **AsLSS**It performed better baseline estimation as compared to both Thresholding algorithm and TopHat algorithm in terms of Goodness-of-Fit and calculation of Area Under Peak with respect to the true baseline of an EIC.Now that you’ve read it, test out this algorithm in action, **download El-Maven** and see the difference yourself.*Please note that all these algorithms and comparisons pertain to mass spec analyses only.*

Get the latest insights on Biomolecular data and ML

Oops! Something went wrong while submitting the form.