find_connections | R Documentation |
A part of the peak clustering algorithm. Iterates over all possible pairs of features
and records a connection between them if a) they have a Pearson correlation coefficient
higher than corr_thresh
and b) their retention time difference is less than
rt_window
find_connections(
data,
features,
corr_thresh = 0.9,
rt_window = 1/60,
name_col,
mz_col,
rt_col
)
data |
data frame with the abundances of features, with features as columns |
features |
data frame with feature information, fData(object) |
corr_thresh |
numeric, the threshold of correlation to use in linking features |
rt_window |
numeric, the retention time window to use in linking features. NOTE you need to use the same unit as in the retention time column |
name_col |
character, name of the column in features that contains feature names |
mz_col |
character, name of the column in features that contains mass-to-charge ratios |
rt_col |
character, name of the column in features that contains retention times |
a data frame of pairs of signals that are linked together
x & y: indexes and names of the signals
cor: correlation coefficient
mz_diff & rt_diff: mass and retention time difference
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.