msp2FSdb {IDSL.FSA} | R Documentation |
msp to Fragmentation Spectra DataBase (FSDB)
Description
This function converts .msp (mass spectra format) files into a readable R object.
Usage
msp2FSdb(path, MSPfile_vector = "", massIntegrationWindow = 0,
allowedNominalMass = FALSE, allowedWeightedSpectralEntropy = TRUE,
noiseRemovalRatio = 0.01, number_processing_threads = 1)
Arguments
path |
Address of .msp file(s) |
MSPfile_vector |
A vector of names of .msp files or one .msp file name. |
massIntegrationWindow |
Mass window in Da to integrate adjacent peaks in the fragmentation spectra |
allowedNominalMass |
c(TRUE, FALSE). Select 'TRUE' only for nominal mass analysis. |
allowedWeightedSpectralEntropy |
c(TRUE, FALSE). Weighted entropy to transform low abundant signals prior to calculating entropy similarity score. Please see the reference for details on wight transformation. |
noiseRemovalRatio |
noise removal ratio ([0 - 1])relative to the basepeak to measure entropy similarity score. |
number_processing_threads |
Number of processing threads for multi-threaded processing |
Value
logFSdb |
Parameters used to create the FSDB object |
PrecursorMZ |
A vector of precursor m/z values |
Precursor Type |
A vector of precursor adduct types |
Retention Time |
A vector of retention time values |
Num Peaks |
A vector of num peaks values indicating number of ions for each fragment spectra |
Spectral Entropy |
A vector of spectral entropy values |
FragmentList |
A list of fragment ions |
MSPLibraryParameters |
A dataframe of tabulated headers and their values for each msp block |
Note
This function was designed not only to achieve the fastest computational speed; but also can standardize .msp files that were generated by inconsistent settings.
References
Li, Y., Kind, T., Folz, J., Vaniya, A., Mehta, S.S. and Fiehn, O. (2021). Spectral entropy outperforms MS/MS dot product similarity for small-molecule compound identification. Nature methods, 18(12), 1524-1531, doi:10.1038/s41592-021-01331-z
Examples
path_extdata <- system.file("extdata", package = "IDSL.FSA")
MSPfile <- c("Kynurenine_Kynurenic_acid.msp")
sampleFSdb <- msp2FSdb(path = path_extdata, MSPfile)