network_from_matrix: Given a matrix of scores (bit score, e-value, etc), create an...

View source: R/network.R

network_from_matrixR Documentation

Given a matrix of scores (bit score, e-value, etc), create an adjacency graph.

Description

I am hoping to use this as the starting point for a generic network generator. In its current form it takes a matrix of pairwise scores and generates an adjacency graph of those scores.

Usage

network_from_matrix(
  scores,
  metadata = NULL,
  type = "distcor",
  simplify = TRUE,
  mode = "undirected",
  weighted = TRUE,
  diag = FALSE
)

Arguments

scores

tsv or matrix of scores with column and row names containing IDs.

metadata

Currently unused, but intended to provide a starting point for annotating the resulting adjacency network. When implemented, it should make use of the annotate_network() functions which follow.

type

Currently I only know of networks which use correlation, distance, and distcor matrices of the original scores; but I suspect a cursory glance at the WGCNA documentation will teach me that there are many more possibilities.

simplify

Return a simplified matrix without loops and redundancies?

mode

Network type to create, I don't yet understand the implications of changing this.

weighted

Add weights to the nodes? I also don't yet understand what happens when you mess with this.

diag

Include the matrix-diagonal nodes? I do not know when one would want these.

Value

igraph adjacency network.


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.