mz_summary {MetNet} | R Documentation |
The function 'mz_summary' creates a summary from the 'AdjacencyMatrix', containing mass differences. Individual mass differences are counted over all features. The input may be an 'AdjacencyMatrix' object originating from the function 'structural', or 'combine'. The parameter 'filter' will define if data will be filtered above a certain threshold or not.
mz_summary(am, filter = 0)
am |
'AdjacencyMatrix', a formal class of 'AdjacencyMatrix' containing the mass differences, that have previously been generated by the function 'structural'or 'combine' |
filter |
'numeric', leave empty or set to '0' if unfiltered data are required. Select a 'numeric' as a threshold on counts of mz differences. May be useful to visualize big data. |
Summarizes the adjacency matrices containing mass difference values, i.e. either adjacency list from 'structural'or 'combine' may be used. The default is filter = F, so the unfiltered summary will be returned. If filter is set to a 'number', e.g. 1000 only mz differences above this threshold will be displayed. The function can be applied for adjacency lists from 'structural' and 'combine'
'data.frame' containing the numbers of present mz differences and corresponding name.
Liesa Salzer, liesa.salzer@helmholtz-muenchen.de
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])) am_struct <- structural(x_test, transformation, ppm = 5, directed = TRUE) # unfiltered mz difference counts mz_summary(am_struct) # filtered mz difference counts mz_summary(am_struct, filter = 2)