Using ms-mint for targeted peak integration of Mass Spec data

Using ms-mint for targeted peak integration

In this post, we will use ms-mint with the objective of integrated peak areas of identified phytochemicals present in apples

Cristian Quiroz-Moreno


September 5, 2023

Goal of this notebook

This notebook has the objective to exemplify the use of targeted integration of phytochemicals that are present in untargeted metabolomics data of apple fruit reported in Bilbrey et al. (2022)

In this case, we are going to use only the quality control (QC) samples.

Importing python libraries

Importing python libraries

In this section, we will upload the required libraries in order to targeted integrate a series of phytochemicals found in apples fruits. The main library for this purpose is ms-mint which allows to integrate ions of interest. In our case, each ion of interest refers to a specific phytochemical. For example, chlorogenic acid with a monoisotopic mass of 354.0950 Da. Thus, the ion in positive ionization mode will be 355.1023 m/z, while an ion of 353.0877 m/z corresponds to negative ionization.

# ms-mint: Instance for MS spectrometry data
from ms_mint.Mint import Mint
import pandas as pd # Data wrangling
import numpy as np
import re # Regular expressions
import glob # listing files
import seaborn as sns
import as px # Interactive plots
import pickle # Export python object
#from ms_mint.notebook import Mint
mint = Mint()

Selecting QCs files

Negative ionization

Here, we are going to select all QC files, and we are printing the first 5 QC files.

QC_files_neg = glob.glob("Data/mzML/Neg/QC*")
mint.ms_files = QC_files_neg


Target ion list

target_list_neg = pd.read_excel("Data/Tables/targets.xlsx", sheet_name = "target_neg")
mint.targets = target_list_neg

Running targeted integration = 'Results/Neg/raw_integration.csv')
<ms_mint.Mint.Mint at 0x109083610>

Positive ionization

On the other side of the ionization polarity, for positive ionization, we proceed with the same workflow; describing the QCs files first, and uploading the target list second.


Loading targets

targets_pos = pd.read_excel("Data/Tables/targets.xlsx", sheet_name = "target_pos")
mint.targets = targets_pos

Running targeted extraction = 'Results/Pos/raw_integration.csv')
<ms_mint.Mint.Mint at 0x109083610>