read_msp_database | R Documentation |
This function reads Mass Spectrometry (MS) data in MSP format from a database, processes the data, and extracts MS2 spectra along with metadata (such as m/z, retention time, and other possible descriptors) from the file. The function supports handling various MSP formats, including those generated by specific software like MetAnalyzer.
read_msp_database(file, threads = 4)
file |
A character string specifying the file path to the MSP file. |
threads |
Numeric, the number of threads to use for parallel processing (not yet implemented). Defaults to '4'. |
The function parses MSP files, extracting both metadata and MS2 spectra, organizing the data into a structured format for further analysis. It can handle MSP data from various sources, including those with custom formats like MetAnalyzer.
A list where each element contains:
info |
A named list containing metadata such as 'mz' (mass-to-charge ratio), 'rt' (retention time), and other descriptors 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 MSP data from a database
msp_data <- read_msp_database(file = "path/to/database.msp")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.