rtCorrection {MetNet} | R Documentation

## Correct connections in the structural adjacency matrix by retention time

### Description

The function 'rtCorrection' corrects the adjacency matrix infered from structural data based on shifts in the retention time. For known chemical modifications (e.g. addition of glycosyl groups) molecules with the moiety should elue at a different time (in the case of glycosyl groups the metabolite should elute earlier in a reverse-phase liquid chromatography system). If the connection for the metabolite does not fit the expected behaviour, the connection will be removed (otherwise sustained).

### Usage

    rtCorrection(structural, x, transformation)

### Arguments

`structural` | 'list' returned by the function 'structural'. The first entry stores the 'numeric' matrix with edges inferred by mass differences. The second entry stores the 'character' matrix with the type (corresponding to the '"group"' column in 'transformation').
`x` | 'matrix', where columns are the samples and the rows are features (metabolites), cell entries are intensity values, 'x' contains the column '"rt"' that has the rt information (numerical values) for the correction of retention time shifts between features that have a putative connection assigned based on m/z value difference
`transformation` | 'data.frame', containing the columns '"group"', and '"rt"' that will be used for correction of transformation of (functional) groups based on retention time shifts derived from 'x'

### Details

'rtCorrection' is used to correct the unweighted adjacency matrix returned by 'structural' when information is available about the retention time and shifts when certain transformation occur (it is meant to filter out connections that were created by m/z differences that have by chance the same m/z difference but different/unexpected retention time behaviour).

'rtCorrection' accesses the second list element of 'structural' and matches the elements in the '"group"' column against the character matrix. In case of matches, 'rtCorrection' accesses the '"rt"' column of 'x' and calculates the retention time difference between the features. 'rtCorrection' then checks if the observed retention time difference matches the expected behaviour (indicated by '"+"' for a higher retention time of the feature with the putative group, '"-"' for a lower retention time of the feature with the putative group or '"?"' when there is no information available or features with that group should not be checked). In case several transformation were assigned to a feature/feature pair connections will always be removed if there is an inconsistency with any of the given transformation.

### Value

'list' containing two matrices. The first entry stores the 'numeric' 'matrix' with edges inferred mass differences corrected by retention time shifts. The second entry stores the 'character' matrix with the type (corresponding to the '"group'" column in 'transformation“) is stored.

### Author(s)

Thomas Naake, thomasnaake@googlemail.com

### Examples

    data("x_test", package = "MetNet")
    transformation <- rbind(
        c("Monosaccharide (-H2O)", "C6H10O5", "162.0528234315", "-"),
        c("Disaccharide (-H2O)", "C12H20O11", "340.1005614851", "-"),
        c("Trisaccharide (-H2O)", "C18H30O15", "486.1584702945", "-"))
    transformation <- data.frame(group = transformation[,1 ],
                                    formula = transformation[,2 ],
                                    mass = as.numeric(transformation[,3 ]),
                                    rt = transformation[, 4])
    struct_adj <- structural(x_test, transformation, ppm = 5)
    struct_adj_rt <- rtCorrection(struct_adj, x_test, transformation)

[Package MetNet version 1.6.0 Index]