read_msp | R Documentation |
This function reads Mass Spectrometry (MS) data in MSP format, processes the data, and extracts MS2 spectra along with metadata (such as m/z and retention time) from the file. It supports handling MSP data from different sources and formats.
read_msp(file, threads = 3)
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 '3'. |
The function parses MSP files to extract both metadata and the MS2 spectra, organizing the data into a structured format for further analysis. It handles both regular MSP formats and those generated by the MetAnalyzer software, which require some additional processing.
A list where each element contains:
info |
A list with metadata for each spectrum, typically containing 'mz' (mass-to-charge ratio) and 'rt' (retention time). |
spec |
A data frame with the 'mz' and 'intensity' values of the MS2 spectrum. |
Xiaotao Shen xiaotao.shen@outlook.com
## Not run:
# Read MSP data
msp_data <- read_msp(file = "path/to/data.msp")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.