msp2TrainingMatrix: msp to Fragmentation Spectra DataBase (FSDB)

View source: R/msp2TrainingMatrix.R

msp2TrainingMatrixR Documentation

msp to Fragmentation Spectra DataBase (FSDB)

Description

This function creates an aligned table from the spectra in the .msp file

Usage

msp2TrainingMatrix(path, MSPfile = "", minDetectionFreq = 1,
selectedFSdbIDs = NULL, dimension = "wide", massAccuracy = 0.01,
allowedNominalMass = FALSE, allowedWeightedSpectralEntropy = TRUE,
noiseRemovalRatio = 0.01, number_processing_threads = 1)

Arguments

path

Address of .msp file or an FSDB

MSPfile

A .msp file name or FSDB in .Rdata format

minDetectionFreq

A minimum detection frequency for an ion across the entire spectra

selectedFSdbIDs

selected MSP block/FSDB IDs to limit the screening to specific ion blocks

dimension

c("wide", "long"). *wide* or *long* alignment matrix output

massAccuracy

A mass accuracy (Da)

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

A FSDB file (.Rdata) and aligned spectra table (.csv) are stored in the same directory.

Examples


temp_wd <- tempdir() # just a temporary folder
path_extdata <- system.file("extdata", package = "IDSL.FSA")
MSPfile <- "Kynurenine_Kynurenic_acid.msp"
file.copy(from = paste0(path_extdata, "/", MSPfile), to = temp_wd)
msp2TrainingMatrix(path = temp_wd, MSPfile, minDetectionFreq = 1)


IDSL.FSA documentation built on July 9, 2023, 6:45 p.m.