matchSamples2Samples: Compare pseudospectra across samples (GC-MS)

View source: R/matchSamples2Samples.R

matchSamples2SamplesR Documentation

Compare pseudospectra across samples (GC-MS)


Function matchSamples2Samples matches pseudospectra across all samples - if a pseudospectrum is present at more or less the same retention time in several samples, it can get the status of “unknown”. Exactly how much difference there may be between the pseudospectra and retention times, and how often it should be present, is determined by the settings. The auxiliary function match.unannot.patterns compares two msp objects, representing experimental samples. Both are not meant to be called directly by the user.


matchSamples2Samples(xset.msp.scaled, xset.msp, annotations, settings)
match.unannot.patterns(msp1, msp2, settings)



Scaled version of all pseudospectra in the experimental patterns - a nested list, with one entry for each sample, and within every entry an element for each pseudospectrum.


Unscaled version of the first argument: both arguments are provided for efficiency reasons.


Annotations of all pseudospectra: only patterns without annotations will be considered.


Settings determining what a valid “unknown” is. For an example, see the man page of FEMsettings, field matchIrrelevants.

msp1, msp2

lists of pseudospectra


Function matchSamples2Samples returns an updated annotation object such as the one returned by matchSamples2DB, but now with an additional unknowns element, containing the pseudospectra that are recognized as “unknowns”.

Function match.unannot.patterns returns a list of combinations of pseudospectra IDs, retention times (or retention indices) and match factors (only for those combinations that satisfy the criteria on retention time (index) and match factor).


Ron Wehrens


## Example of settings
  metaSetting(object = TSQXLS.GC, field= "betweenSamples")

rwehrens/metaMS documentation built on Feb. 27, 2023, 5:13 a.m.