get_interaction_from_correlation: Interaction_from_correlation

View source: R/merge_layers_by_correlation.R

get_interaction_from_correlationR Documentation

Interaction_from_correlation

Description

Compute correlation between two dataframe X and Y (or list of data.frame). An incidence graph is returned. A link between two features is produced if their correlation (absolute value) is above the threshold.

Usage

get_interaction_from_correlation(X, Y, threshold = 0.5)

Arguments

X

a data.frame or list of data.frame (with a similar number of row).

Y

a data.frame or list of data.frame (with a similar number of row).

threshold

a threshold to cut the correlation matrix above which a link is created between a feature from X and a feature from Y.

Value

an 'igraph' object

Examples

X <- matrix(rexp(200, rate=.1), ncol=20)
Y <- matrix(rexp(200, rate=.1), ncol=20)
get_interaction_from_correlation(X,Y)

X <- list(matrix(rexp(200, rate=.1), ncol=20), 
          matrix(rexp(200, rate=.1), ncol=20))
Y <- matrix(rexp(200, rate=.1), ncol=20)
get_interaction_from_correlation(X,Y)


abodein/netOmics documentation built on Oct. 20, 2024, 9:25 a.m.