read_msp_gnps | R Documentation |
This function reads and processes MSP data files from the GNPS (Global Natural Products Social Molecular Networking) database. The function extracts both metadata (such as m/z and intensity) and the spectrum information for each entry. The MSP data is returned as a list of parsed entries.
read_msp_gnps(file, threads = 5)
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 '5'. |
This function is designed to handle MSP data from the GNPS database. The data is organized into a structured list, where each list element corresponds to a spectrum with associated metadata and peak information.
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. |
Xiaotao Shen xiaotao.shen@outlook.com
## Not run:
# Read MSP data from GNPS
msp_data <- read_msp_gnps(file = "path/to/gnps_data.msp")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.