Check CAMERA ion species annotation due to matching with opposite ion mode

Share:

Description

This function check annoations of ion species with the help of a sample from opposite ion mode. As first step it searches for pseudospectra from the positive and the negative sample within a retention time window. For every result the m/z differences between both samples are matched against specific rules, which are combinations from pos. and neg. ion species. As example M+H and M-H with a m/z difference of 2.014552. If two ions matches such a difference, the ion annotations are changed (previous annotation is wrong), confirmed or added. Returns the peaklist from one ion mode with recalculated annotations.

Usage

1
  combinexsAnnos(xsa.pos, xsa.neg, pos=TRUE, tol=2, ruleset=NULL)

Arguments

xsa.pos

xsAnnotate object with positive ion mode

xsa.neg

xsAnnotate object with neagtive ion mode

pos

If TRUE the peaklist from the positive mode is returned, if FALSE the negative

tol

Retention time window in seconds

ruleset

Matrix of matching rules, see example

Details

Both xsAnnotate object should be full processed (grouping and annotation). Without previous annotation the resulting peaklist only includes annotation with matches peaks from both mode according to the rule(s). With ruleset=NULL the function only looks for M+H/M-H pairs. The ruleset is a two column matrix with includes rule indices from the rule table of both xsAnnotate objects. ruleset <- cbind(1,1) would create the M+H/M-H rule, since the first rule of xsa.pos@ruleset and xsa.neg@ruleset is M+H respectively M-H. Only rules with identical charge can be combined!

Value

Returns a (normal) CAMERA peaklist with a additional column neg. Mode or pos. Mode, where matching peaks from the opposite mode are noted.

Author(s)

Carsten Kuhl <ckuhl@ipb-halle.de>

Examples

1
2
3
4
5
 ## Not run: 
 #Searches for M+H/M-H combinations within a retention time window of 2 seconds
 peaklist.pos <- combinexsAnnos(xsa.pos, xsa.neg, tol=2)
 
## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.