purityCorrect-methods {MSnbase} | R Documentation

## Performs reporter ions purity correction

### Description

Manufacturers sometimes provide purity correction values indicating the percentages of each reporter ion that have masses differing by +/- n Da from the nominal reporter ion mass due to isotopic variants. This correction is generally applied after reporter peaks quantitation.

Purity correction here is applied using `solve` from the `base` package using the purity correction values as coefficient of the linear system and the reporter quantities as the right-hand side of the linear system. 'NA' values are ignored and negative intensities after correction are also set to 'NA'.

A more elaborated purity correction method is described in Shadforth et al., i-Tracker: for quantitative proteomics using iTRAQ. BMC Genomics. 2005 Oct 20;6:145. (PMID 16242023).

Function `makeImpuritiesMatrix(x, filename, edit = TRUE)` helps the user to create such a matrix. The function can be used in two ways. If given an integer `x`, it is used as the dimension of the square matrix (i.e the number of reporter ions). For TMT6-plex and iTRAQ4-plex, default values taken from manufacturer's certification sheets are used as templates, but batch specific values should be used whenever possible. Alternatively, the `filename` of a `csv` spreadsheet can be provided. The sheet should define the correction factors as illustrated below (including reporter names in the first column and header row) and the corresponding correction matrix is calculated. Examples of such `csv` files are available in the package's `extdata` directory. Use `dir(system.file("extdata", package = "MSnbase"), pattern = "PurityCorrection", full.names = TRUE)` to locate them. If `edit = TRUE`, the the matrix can be edited before it is returned.

### Arguments

`object` | An object of class `"MSnSet"`.
`impurities` | A square 'matrix' of dim equal to ncol(object) defining the correction coefficients to be applied. The reporter ions should be ordered along the columns and the relative percentages along the rows. As an example, below is the correction factors as provided in an ABI iTRAQ 4-plex certificate of analysis:
reporter | % of -2 | % of -1 | % of +1 | % of +2
114 | 0.0 | 1.0 | 5.9 | 0.2
115 | 0.0 | 2.0 | 5.6 | 0.1
116 | 0.0 | 3.0 | 4.5 | 0.1
117 | 0.1 | 4.0 | 3.5 | 0.1
The impurity table will be
0.929 | 0.059 | 0.002 | 0.000
0.020 | 0.923 | 0.056 | 0.001
0.000 | 0.030 | 0.924 | 0.045
0.000 | 0.001 | 0.040 | 0.923
where, the diagonal is computed as 100 - sum of rows of the original table and subsequent cells are directly filled in. Similarly, for TMT 6-plex tags, we observe
reporter | % of -3 | % of -2 | % of -1 | % of +1 % | % of +2 | % of +3
126 | 0 | 0 | 0 | 6.1 | 0 | 0
127 | 0 | 0 | 0.5 | 6.7 | 0 | 0
128 | 0 | 0 | 1.1 | 4.2 | 0 | 0
129 | 0 | 0 | 1.7 | 4.1 | 0 | 0
130 | 0 | 0 | 1.6 | 2.1 | 0 | 0
131 | 0 | 0.2 | 3.2 | 2.8 | 0 | 0
and obtain the following impurity correction matrix
0.939 | 0.061 | 0.000 | 0.000 | 0.000 | 0.000
0.005 | 0.928 | 0.067 | 0.000 | 0.000 | 0.000
0.000 | 0.011 | 0.947 | 0.042 | 0.000 | 0.000
0.000 | 0.000 | 0.017 | 0.942 | 0.041 | 0.000
0.000 | 0.000 | 0.000 | 0.016 | 0.963 | 0.021
0.000 | 0.000 | 0.000 | 0.002 | 0.032 | 0.938
For iTRAQ 8-plex, given the following correction factors (to make such a matrix square, if suffices to add -4, -3, +3 and +4 columns filled with zeros):
TAG | -2 | -1 | +1 | +2
113 | 0 | 2.5 | 3 | 0.1
114 | 0 | 1 | 5.9 | 0.2
115 | 0 | 2 | 5.6 | 0.1
116 | 0 | 3 | 4.5 | 0.1
117 | 0.1 | 4 | 3.5 | 0.1
118 | 0.1 | 2 | 3 | 0.1
119 | 0.1 | 2 | 4 | 0.1
121 | 0.1 | 2 | 3 | 0.1
we calculate the impurity correction matrix shown below
| 113 | 114 | 115 | 116 | 117 | 118 | 119 | 121
% reporter 113 | 0.944 | 0.030 | 0.001 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 114 | 0.010 | 0.929 | 0.059 | 0.002 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 115 | 0.000 | 0.020 | 0.923 | 0.056 | 0.001 | 0.000 | 0.000 | 0.000
% reporter 116 | 0.000 | 0.000 | 0.030 | 0.924 | 0.045 | 0.001 | 0.000 | 0.000
% reporter 117 | 0.000 | 0.000 | 0.001 | 0.040 | 0.923 | 0.035 | 0.001 | 0.000
% reporter 118 | 0.000 | 0.000 | 0.000 | 0.001 | 0.020 | 0.948 | 0.030 | 0.001
% reporter 119 | 0.000 | 0.000 | 0.000 | 0.000 | 0.001 | 0.020 | 0.938 | 0.040
% reporter 121 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.001 | 0.020 | 0.948
Finally, for a TMT 10-plex impurity matrix (for example lot RH239932)
. | -2 | -1 | 1 | 2
126 | 0.0 | 0.0 | 5.0 (127C) | 0.0 (128C)
127N | 0.0 | 0.2 | 5.8 (128N) | 0.0 (129N)
127C | 0.0 | 0.3 (126) | 4.8 (128C) | 0.0 (129C)
128N | 0.0 | 0.4 (127N) | 4.1 (129N) | 0.0 (130N)
128C | 0.0 (126) | 0.6 (127C) | 3.0 (129C) | 0.0 (130C)
129N | 0.0 (127N) | 0.8 (128N) | 3.5 (130N) | 0.0 (131)
129C | 0.0 (127C) | 1.4 (128C) | 2.4 (130C) | 0.0
130N | 0.1 (128N) | 1.5 (129N) | 2.4 (131) | 3.2
130C | 0.0 (128C) | 1.7 (129C) | 1.8 | 0.0
131 | 0.2 (129N) | 2.0 (130N) | 2.2 | 0.0
(Note that a previous example, taken from lot PB199188A, contained a typo.) the impurity correction matrix is
. | 126 | 127N | 127C | 128N | 128C | 129N | 129C | 130N | 130C | 131
% reporter 126 | 0.950 | 0.000 | 0.050 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 127N | 0.000 | 0.940 | 0.000 | 0.058 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 127C | 0.003 | 0.000 | 0.949 | 0.000 | 0.048 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 128N | 0.000 | 0.004 | 0.000 | 0.955 | 0.000 | 0.041 | 0.000 | 0.000 | 0.000 | 0.000
% reporter 128C | 0.000 | 0.000 | 0.006 | 0.000 | 0.964 | 0.000 | 0.030 | 0.000 | 0.000 | 0.000
% reporter 129N | 0.000 | 0.000 | 0.000 | 0.008 | 0.000 | 0.957 | 0.000 | 0.035 | 0.000 | 0.000
% reporter 129C | 0.000 | 0.000 | 0.000 | 0.000 | 0.014 | 0.000 | 0.962 | 0.000 | 0.024 | 0.000
% reporter 130N | 0.000 | 0.000 | 0.000 | 0.001 | 0.000 | 0.015 | 0.000 | 0.928 | 0.000 | 0.024
% reporter 130C | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.017 | 0.000 | 0.965 | 0.000
% reporter 131 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.002 | 0.000 | 0.020 | 0.000 | 0.956
These examples are provided as defaults impurity correction matrices in `makeImpuritiesMatrix`.

### Methods

`signature(object = "MSnSet", impurities = "matrix")`

### Examples

    ## quantifying full experiment
    data(msnset)
    impurities <- matrix(c(0.929,0.059,0.002,0.000,
    		       0.020,0.923,0.056,0.001,
    		       0.000,0.030,0.924,0.045,
    		       0.000,0.001,0.040,0.923),
    		     nrow=4, byrow = TRUE)
    ## or, using makeImpuritiesMatrix()
    ## Not run: impurities <- makeImpuritiesMatrix(4)
    msnset.crct <- purityCorrect(msnset, impurities)
    head(exprs(msnset))
    head(exprs(msnset.crct))
    processingData(msnset.crct)

    ## default impurity matrix for iTRAQ 8-plex
    makeImpuritiesMatrix(8, edit = FALSE)

    ## default impurity matrix for TMT 10-plex
    makeImpuritiesMatrix(10, edit = FALSE)

[Package MSnbase version 2.18.0 Index]