How to Baseline Correct Mass Spectrometry Data Using Python and Peakutils

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • In this video, I'm going to show you how to do something really cool - baseline correction on mass spectrometry data using the PeakUtils library. But don't worry, it's not as complicated as it sounds! I'll guide you through the process step-by-step and even use some E. coli mass spectrometry data to demonstrate. With the help of PeakUtils, you'll be able to get super accurate results and improve the quality of your data analysis. So sit back, relax, and let's get started!
    Github: github.com/chr...
    peak_picking: • 2 Methods to Find Peak...
    baseline correction: • How to Baseline Correc...
    Signal Filtering: • Analytical Signal Proc...

Комментарии • 21

  • @CJP3
    @CJP3  Год назад +9

    More analytical data processing videos soon!🎉

  • @marcellopojucan3419
    @marcellopojucan3419 6 месяцев назад

    You saved my life, brother. thank you so much. Greetings from Brazil

    • @CJP3
      @CJP3  6 месяцев назад

      Howdy!! My pleasure! 🙏🏽

  • @OmnipotentEntity
    @OmnipotentEntity 5 месяцев назад

    Please note, the example data given does not seem to actually have a non-linear baseline. The apparent baseline in the higher range seems to be solely due to the overlap of the gaussians from insufficient resolution and separation. As a simple example, try to graph exp(-9 x^2) + exp(-9 (x-1)^2), you'll see in the middle of this plot at about 1/2, there seems to be an elevated baseline of about 1/5 or so, but clearly there isn't one from the formula of the graph. When performing data transformations like this, you should be careful, as attempting to eliminate a fake baseline such as this can move your peaks in relation to each other in both the x and y directions (in the example given, it moves your peaks away from each other slightly and shrinks them), causing unnecessary systematic errors.

    • @CJP3
      @CJP3  5 месяцев назад +1

      Great point! I’ve run into that pitfall at work. I should have chosen a better dataset for the demonstration. Thanks for the comment!!!

  • @mariron42
    @mariron42 8 месяцев назад

    Excelente, justo lo que estaba buscando

    • @CJP3
      @CJP3  8 месяцев назад +1

      Muchas gracias, estoy feliz de escucharlo

  • @justinlin6798
    @justinlin6798 Год назад

    Amazing video!!

    • @CJP3
      @CJP3  Год назад

      Thank you very much!!

  • @Haav89
    @Haav89 Год назад +2

    What if the baseline has a periodical behavior?

    • @CJP3
      @CJP3  Год назад +1

      Hi Hugo, If there baseline is a periodic you can use a higher order polynomial fit to try to eliminate the oscillation. If the data is from a timeseries, there are other methods available as well. Thanks for watching!

  • @robertbarrios9969
    @robertbarrios9969 10 месяцев назад

    I have spent months trying to do BC with gpt and it does not work good, the code does not corrected all the peaks from my NIR spectra data. I'm going to try with your tutorial I Believe that i have some of hope that it work this time. Thank you so much.
    Oh, I almost forget the detrending. Can you make a tutorial about detrending?

    • @CJP3
      @CJP3  10 месяцев назад

      Great suggestion! I’ll certainly work on that video! Great suggestion. If you continue to have issues with reliable BC let me know. There are other techniques that could also work!

    • @robertbarrios9969
      @robertbarrios9969 9 месяцев назад

      @@CJP3 I want to do the BC for all the spectrums of my NIR dataset, based on what should I do it? What I want to ask is if based on a 'fake' spectrum that is the average of all, or one that looks more 'central' or the spectrum that is lower on the graph, or just maybe do the bc based on itself, how the algorithm manages to model it. Thanks in advance.

  • @peacebarefoot4385
    @peacebarefoot4385 5 месяцев назад

    Any idea why there's a large "background peak"/hump in the data between 650 and 800? I also have that in my mass spectrometer data

    • @CJP3
      @CJP3  5 месяцев назад

      Howdy! Yes, that background is indicative of 1. Insufficient mass resolution and or 2. Too much signal.
      It’s a common issue for complex materials!
      I hope this helps :)

    • @peacebarefoot4385
      @peacebarefoot4385 4 месяца назад

      @@CJP3 Thank you!

  • @rajshekhar616
    @rajshekhar616 11 месяцев назад

    When I insert peakutils, it says no module named peakutils. why is it so?

    • @CJP3
      @CJP3  11 месяцев назад

      Howdy! Sorry to hear that! Did you pip install the package?

    • @rajshekhar616
      @rajshekhar616 11 месяцев назад

      ​@@CJP3 I am using Anaconda. What do I have to do? I am copy pasting the error message.
      ModuleNotFoundError Traceback (most recent call last)
      Cell In[33], line 16
      13 from scipy.sparse.linalg import spsolve
      15 get_ipython().system('pip install peakutils')
      ---> 16 from peakutils import baseline
      ModuleNotFoundError: No module named 'peakutils'
      the code is:
      !pip install peakutils
      from peakutils import baseline

    • @CJP3
      @CJP3  9 месяцев назад

      @@rajshekhar616Does the !pip command execute properly?