read_mgf_mona | R Documentation |
This function reads Mass Spectrometry (MS) data in MGF format from the MoNA (MassBank of North America) database, extracts the MS2 spectra, and returns them in a structured format.
read_mgf_mona(file, threads = 3)
file |
A character vector containing file paths to the MGF files from MoNA. |
threads |
Numeric, the number of threads to use for parallel processing. Defaults to '3'. |
The function parses MGF files from MoNA, a public repository of mass spectrometry data, extracts both metadata and the MS2 spectra, and organizes the data into a structured format for further processing. Parallel processing is supported to improve efficiency when handling large datasets.
A list where each element contains the MS2 spectra and related metadata for each entry in the MGF file. Each entry includes:
info |
A data frame with metadata (such as m/z, retention time, etc.) for each spectrum. |
spec |
A data frame containing the 'mz' and 'intensity' values of the MS2 spectrum. |
Xiaotao Shen xiaotao.shen@outlook.com
## Not run:
# Read MGF data from MoNA
mgf_data <- read_mgf_mona(file = c("path/to/mgf1.mgf", "path/to/mgf2.mgf"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.