createStructuralAdjacency {MetNet}R Documentation

Create adjacency matrix based on m/z (molecular weight) difference

Description

The function createStructuralAdjacency infers an adjacency matrix using differences in m/z values that are matched against a data.frame of theoretically calculated differences of loss/addition of functional groups. createStructuralAdjacency returns the unweighted adjacency matrix together with a character matrix with the type of loss/addition as a list at the specific positions.

Usage

createStructuralAdjacency(x, transformation, ppm=5)

Arguments

x

matrix, where columns are the samples and the rows are features (metabolites), cell entries are intensity values, x contains the column 'mz' that has the m/z information (numerical values) for the calculation of mass differences between features

transformation

data.frame, containing the columns "group", and 'mass' that will be used for detection of transformation of (functional) groups

ppm

numeric, mass accuracy of m/z features in parts per million (ppm)

Details

createStructuralAdjacency accesses the column 'mz' of x to infer structural topologies based on the functional groups supplied by transformation. To account for the mass accuracy of the dataset x, the user can specify the accuracy of m/z features in parts per million (ppm) by the ppm argument. The m/z values in the 'mz' column of x will be converted to m/z ranges according to the ppm argument (default ppm=5).

Value

list containing two matrices, in the first list entry the matrix with edges inferred mass differences is stored, in the second list entry the 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("Hydroxylation (-H)", "O", "15.9949146221"),
    c("Malonyl group (-H2O)", "C3H2O3", "86.0003939305"),
    c("C6H10O6", "C6H10O6", "178.0477380536"),
    c("D-ribose (-H2O) (ribosylation)", "C5H8O4", "132.0422587452"),
    c("Disaccharide (-H2O)", "C12H20O11", "340.1005614851"),
    c("Glucuronic acid (-H2O)", "C6H8O6", "176.0320879894"),
    c("Monosaccharide (-H2O)", "C6H10O5", "162.0528234315"),
    c("Trisaccharide (-H2O)", "C18H30O15", "486.1584702945"))
transformation <- data.frame(group=transformation[,1],
                                formula=transformation[,2],
                                mass=as.numeric(transformation[,3]))
struct_adj <- createStructuralAdjacency(x_test, transformation, ppm=5)

[Package MetNet version 1.0.1 Index]