buildGRAPH: Build a correlation network of peaks

Description Usage Arguments Details Value

View source: R/utils.R

Description

Function build a correlation network of peaks using igraph package functionality. Only connections above the selected correlation threshold (cor_thr) will be retained in the network.

Usage

1
buildGRAPH(pkg_cor, cor_thr, plot = TRUE, title = NULL, out_dir = NULL)

Arguments

pkg_cor

data.frame containing a row for each unique peak-peak pair. Columns 'from' and 'to' specify peak identifiers, column 'weight' represents correlation coefficient.

cor_thr

numeric specifying a threshold for correlation coefficient below which peak pairs are omitted from the network.

plot

logical whether to save a PNG of the built network.

title

character specifying name for the plot, required if PLOT = TRUE.

out_dir

character specifying absolute path to output directory, where a PNG would be written.

Details

Function requires a data.frame with unique peak-peak pairs and correlation coefficients describing their relationship. Such data frame can be built using getCORmat function. This function is used to build correlation networks using coefficients that represent either EIC correlation of peaks in a single LC-MS sample, or inter-sample intensity correlation.

Value

Function returns community membership for each peak.


lauzikaite/massFlowR documentation built on April 29, 2020, 9:45 a.m.