read_msp_mona: —————– Read MSP Data from MoNA

read_msp_monaR Documentation

————————————————————————— Read MSP Data from MoNA

Description

This function reads and processes MSP data files from the MoNA (MassBank of North America) database. The function parses the MSP file and extracts both metadata (such as m/z and intensity) and the spectrum information for each entry. The MSP data is then returned as a list.

Usage

read_msp_mona(file, threads = 3)

Arguments

file

A character vector specifying the file path(s) to the MSP file(s).

threads

Numeric, the number of threads to use for parallel processing. Defaults to '3'.

Details

This function is designed to handle MSP data specifically from MoNA. The data is organized into a structured list, where each list element corresponds to a spectrum with associated metadata and peak information.

Value

A list where each element contains:

info

A data frame with metadata for each spectrum (typically containing identifiers like m/z, intensity, and other descriptors).

spec

A data frame with the 'mz' (mass-to-charge ratio) and 'intensity' values of the MS2 spectrum.

Author(s)

Xiaotao Shen xiaotao.shen@outlook.com

Examples

## Not run: 
# Read MSP data from MoNA
msp_data <- read_msp_mona(file = "path/to/mona_data.msp")

## End(Not run)


tidymass/metid documentation built on Sept. 14, 2024, 4:43 p.m.