rtDevModelling: MS/MS spectrum grouping and retention time deviation...

Description Usage Arguments Value Examples

View source: R/rtDevModelling.R

Description

MS/MS spectrum grouping and retention time deviation modelling for adductomicsR

Usage

1
2
3
4
5
6
7
8
rtDevModelling(MS2Dir = NULL, runOrder = NULL, 
nCores = NULL, TICfilter = 0, 
intStdPeakList=c(290.21, 403.30, 516.38, 587.42,849.40, 884.92, 958.46,
993.97,1050.52, 1107.06, 1209.73, 1337.79,1465.85), 
intStdMass = 834.77692, intStd_MaxMedRtDrift = 600, intStd_MaxPpmDev = 200,
minSpecEx = 40, 
minDotProd = 0.8, percMissing = 15, percExtra = 100, smoothingSpan = 0.8,
saveRtDev = 1, outputPlotDir = NULL)

Arguments

MS2Dir

character a full path to a directory containing either .mzXML or .mzML data

runOrder

character a full path to a csv file specifying the runorder for each of the files the first column must contain the precise file name and the second column an integer representing the precise run order.

nCores

numeric the number of cores to use for parallel computation. The default is to 1 core.

TICfilter

numeric minimimum total ion current of an MS/MS scan. Any MS/MS scan below this value will be filtered out (default=0).

intStdPeakList

character a comma seperated list of expected fragment ions for the internal standard spectrum (no white space).

intStdMass

numeric expected mass-to-charge ratio of internal standard precursor (default = 834.77692).

intStd_MaxMedRtDrift

numeric the maximum retention time drift window (in seconds) to identify internal standard MS/MS spectrum scans (default = 600).

intStd_MaxPpmDev

numeric the maximum mass accuracy window (in ppm) to identify internal standard MS/MS spectrum scans (default = 200 ppm).

minSpecEx

numeric the minimum percentage of the total ion current explained by the internal standard fragments (default = 40). Sometimes spectra are not identified due to this cutoff being set too high. If unexpected datapoints have been interpolated then reduce this value.

minDotProd

numeric. Minimum mean dot product spectral similarity score to keep a spectrum within an MS/MS group (default = 0.8).

percMissing

numeric. percentage of missing files for a MS/MS scan group to be utilized in the loess retention time deviation model. Roughly 15 percent missing values (default = 15%) is a good starting point (e.g. nMissing=10 for 68 samples).

percExtra

numeric percentage of extra scans above the total number of files for a MS/MS scan group to be utilized in the loess retention time deviation model. If a MS/MS scan group consists of many scans far in excess of the number of files then potentially MS/MS scans from large tailing peaks or isobars may be erroneously grouped together and used to adjust retention time incorrectly (default = 100% i.e. the peak group can only have one scan per file, this value can be increased if two or more consecutive scans for example can be considered).

smoothingSpan

numeric. fixed smoothing span, argument to loess. If argument is not supplied then optimal smoothing span is calculated for each file seperately using 7-fold CV.

saveRtDev

integer (default = 1) should just the retention time deviation model be saved (TRUE = 1) or the AdductSpec class object (FALSE = 0) as .RData workspace files.

outputPlotDir

character (default = NULL) output directory for plots.

Value

LOESS RT models as adductSpectra AdductSpec object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
eh = ExperimentHub();
temp = query(eh, 'adductData');
temp[['EH2061']]; #first mzXML file
file.rename(cache(temp["EH2061"]), file.path(hubCache(temp), 
'data42_21221_2.mzXML'));
rtDevModelling(MS2Dir=hubCache(temp),nCores=2,runOrder=paste0(
system.file("extdata",package="adductomicsR"),
'/runOrder2.csv'), intStdPeakList=c(290.21, 403.30, 516.38, 
587.42,849.40, 884.92, 958.46, 993.97,1050.52, 1107.06, 1209.73, 
1337.79,1465.85))

adductomicsR documentation built on Nov. 8, 2020, 4:49 p.m.