Skip to contents

Iterate through a list of membership matrices and construct pairwise networks for every combination, and output them as a symmetric matrix with labeled dimensions. This can be interpreted as an "adjacency" matrix between all of the different metagenes across all the datasets in the file list. The dimension names will take the original dimension names and concatenate them with the unique file names, such that the dimension names are guaranteed to be unique.

Usage

construct_rbh_correlation_based(
  network_membership_list,
  lower_quant = 0,
  upper_quant = 1,
  max_rank = 1,
  abs = FALSE,
  sparse = FALSE,
  method = "pearson",
  binary = FALSE
)

Arguments

network_membership_list

a list containing community membership scores for each network. Where rownames contain unique gene ids and column names are community names

lower_quant

indicates the quantile for the minimum correlation for the reciprocal best hits we will find.

upper_quant

indicates the quantile for correlations above which ANY metagene pairing will be considered a "hit."

max_rank

represents highest column and row rankings accepted for our reciprocal best hits network. Pure reciprocal best hits uses max_rank of 1.

abs

logical, take absolute values of correlations?

sparse

logical, use a sparse matrix to store network?

method

string, same as stats::cor()

binary

logical, indicates whether or not the meta residual best hits matrix should show correlations or simply binary (as.numeric(correlation > 0)) output

Value

reciprocal best hits matrix between all metagenes across all of the datasets in the specified files, with dimensions named uniquely based on the file column names as well as the file names (to ensure uniqueness).

Examples

if (FALSE) {
memb_list <- list(
  GSE39582 = GSE39582_icwgcna$community_membership,
  READ = read_icwgcna$community_membership,
  COAD = coad_icwgcna$community_membership
)
ma <- construct_rbh_correlation_based(
  memb_list,
  upper_quant = .99,
  lower_quant = .05,
  max_rank = 2
)
}