| Title: | Nominal Peak Analysis (NPA) |
|---|---|
| Description: | A pipeline to process nominal mass spectrometry data to create .msp files for untargeted analyses. |
| Authors: | Sadjad Fakouri-Baygi [aut]
|
| Maintainer: | Dinesh Barupal <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.2 |
| Built: | 2026-05-20 06:06:21 UTC |
| Source: | https://github.com/idslme/idsl.npa |
This function creates standard .msp files that can also be used for Pepsearch.
IDSL.NPA_MSPgenerator(NPA_peaklist, number_processing_threads = 1)IDSL.NPA_MSPgenerator(NPA_peaklist, number_processing_threads = 1)
NPA_peaklist |
A dataframe peaklist of co-detected peaks |
number_processing_threads |
Number of processing threads for multi-threaded processing |
A string of standard .msp file
This function creates reference standard .msp files.
IDSL.NPA_referenceMSPgenerator(NPA_peaklist, refNPAtable, selectedPeaks_IDref)IDSL.NPA_referenceMSPgenerator(NPA_peaklist, refNPAtable, selectedPeaks_IDref)
NPA_peaklist |
A dataframe peaklist of co-detected peaks |
refNPAtable |
reference NPA table |
selectedPeaks_IDref |
selectedPeaks_IDref |
A string of standard .msp file
This function executes the NPA workflow.
IDSL.NPA_workflow(spreadsheet)IDSL.NPA_workflow(spreadsheet)
spreadsheet |
NPA spreadsheet |
This function organizes the IDSL.NPA file processing for better performance using the template spreadsheet.
This function processes the spreadsheet of the NPA parameters to ensure the parameter inputs are consistent with the requirements of the IDSL.NPA pipeline.
IDSL.NPA_xlsxAnalyzer(spreadsheet)IDSL.NPA_xlsxAnalyzer(spreadsheet)
spreadsheet |
'Start' tab of the parameter spreadsheet |
This function returns the NPA parameters to feed the 'IDSL.NPA_workflow' function.
This function detects fragmentation peaks for the NPA analysis
NPA_fragmentationPeakDetection(input_MS_path, MSfilename, smoothingWindow, peakHeightThreshold, minSNRbaseline, RTtolerance, nSpline, topRatioPeakHeight, minIonRangeDifference, minNumNPApeaks, pearsonRHOthreshold, outputNPAeic = NULL, number_processing_threads = 1)NPA_fragmentationPeakDetection(input_MS_path, MSfilename, smoothingWindow, peakHeightThreshold, minSNRbaseline, RTtolerance, nSpline, topRatioPeakHeight, minIonRangeDifference, minNumNPApeaks, pearsonRHOthreshold, outputNPAeic = NULL, number_processing_threads = 1)
input_MS_path |
path to the MS files |
MSfilename |
MS file |
smoothingWindow |
number of scans for peak smoothing. |
peakHeightThreshold |
A minimum peak height threshold |
minSNRbaseline |
A minimum baseline S/N threshold |
RTtolerance |
retention time tolerance to detect common peaks |
nSpline |
number of points for further smoothing using a cubic spline smoothing method to add more points to calculate Pearson correlation rho values |
topRatioPeakHeight |
The top percentage of the chromatographic peak to calculate Pearson correlation rho values |
minIonRangeDifference |
Minimum distance (Da) between lowest and highest m/z to prevent clustering isotopic envelopes |
minNumNPApeaks |
Minumum number of ions in a NPA cluster |
pearsonRHOthreshold |
Minimum threshold for Pearson correlation rho values |
outputNPAeic |
When 'NULL' NPA EICs are not plotted. 'outputNPAeic' represents an address to save NPA EICs figures. |
number_processing_threads |
Number of processing threads for multi-threaded processing |
A dataframe peaklist of co-detected NPA analysis.
This function detects fragmentation peaks for the NPA analysis.
NPA_peakDeconvolution(input_MS_path, MSfilename, smoothingWindow, peakHeightThreshold, minSNRbaseline, number_processing_threads = 1)NPA_peakDeconvolution(input_MS_path, MSfilename, smoothingWindow, peakHeightThreshold, minSNRbaseline, number_processing_threads = 1)
input_MS_path |
path to the MS files |
MSfilename |
MS file |
smoothingWindow |
number of scans for peak smoothing. |
peakHeightThreshold |
A minimum peak height threshold |
minSNRbaseline |
A minimum baseline S/N threshold |
number_processing_threads |
Number of processing threads for multi-threaded processing |
A dataframe peaklist of co-detected DIA analysis.
NPA reference xlsxAnalyzer
NPA_reference_xlsxAnalyzer(ref_xlsx_file, input_path_hrms = NULL, PARAM = NULL, PARAM_ID = "", checkpoint_parameter = TRUE)NPA_reference_xlsxAnalyzer(ref_xlsx_file, input_path_hrms = NULL, PARAM = NULL, PARAM_ID = "", checkpoint_parameter = TRUE)
ref_xlsx_file |
ref_xlsx_file |
input_path_hrms |
input_path_hrms |
PARAM |
PARAM |
PARAM_ID |
PARAM_ID |
checkpoint_parameter |
checkpoint_parameter |
ref_table |
ref_table |
PARAM |
PARAM |
checkpoint_parameter |
checkpoint_parameter |
This function runs the NPA analysis.
NPA_workflow(PARAM_NPA)NPA_workflow(PARAM_NPA)
PARAM_NPA |
PARAM_NPA |
This function stores .Rdata and .csv data from dataframe peaklist of co-detected NPA analysis.
s_path <- system.file("extdata", package = "IDSL.NPA") SSh1 <- paste0(s_path,"/NPA_parameters.xlsx") ## To see the results, use a known folder instead of the `tempdir()` command temp_wd <- tempdir() temp_wd_zip <- paste0(temp_wd, "/idsl.npa_testfile.zip") spreadsheet <- readxl::read_xlsx(SSh1, sheet = "NPA") PARAM_NPA <- cbind(spreadsheet[, 2], spreadsheet[, 4]) download.file(paste0("https://github.com/idslme/IDSL.NPA/blob/main/", "NPA_educational_files/idsl.npa_testfile.zip?raw=true"), destfile = temp_wd_zip, mode = "wb") unzip(temp_wd_zip, exdir = temp_wd) PARAM_NPA[2, 2] <- "NO" PARAM_NPA[4, 2] <- temp_wd PARAM_NPA[8, 2] <- temp_wd ## To ensure `PARAM_NPA` is consistent with the `NPA_workflow` PARAM_NPA <- NPA_xlsxAnalyzer(PARAM_NPA) ## NPA_workflow(PARAM_NPA)s_path <- system.file("extdata", package = "IDSL.NPA") SSh1 <- paste0(s_path,"/NPA_parameters.xlsx") ## To see the results, use a known folder instead of the `tempdir()` command temp_wd <- tempdir() temp_wd_zip <- paste0(temp_wd, "/idsl.npa_testfile.zip") spreadsheet <- readxl::read_xlsx(SSh1, sheet = "NPA") PARAM_NPA <- cbind(spreadsheet[, 2], spreadsheet[, 4]) download.file(paste0("https://github.com/idslme/IDSL.NPA/blob/main/", "NPA_educational_files/idsl.npa_testfile.zip?raw=true"), destfile = temp_wd_zip, mode = "wb") unzip(temp_wd_zip, exdir = temp_wd) PARAM_NPA[2, 2] <- "NO" PARAM_NPA[4, 2] <- temp_wd PARAM_NPA[8, 2] <- temp_wd ## To ensure `PARAM_NPA` is consistent with the `NPA_workflow` PARAM_NPA <- NPA_xlsxAnalyzer(PARAM_NPA) ## NPA_workflow(PARAM_NPA)
This function processes the spreadsheet of the NPA spreadsheet tab to ensure the parameter inputs are in agreement with requirements of the NPA analysis.
NPA_xlsxAnalyzer(spreadsheet)NPA_xlsxAnalyzer(spreadsheet)
spreadsheet |
NPA spreadsheet tab |
parameters to feed the 'NPA_workflow' function.