network_dist_pairwise_genes: Comparison of binary adjacency weights of the same gene in...

View source: R/old/network_dist_pairwise_genes.R

network_dist_pairwise_genesR Documentation

Comparison of binary adjacency weights of the same gene in two different networks

Description

Compute the pairwise Hamming or Jaccard distance between binary edge weights of the same genes in two different network topologies (denoted as adj_mat_qry and adj_mat_sbj).

Usage

network_dist_pairwise_genes(
  adj_mat_qry,
  adj_mat_sbj,
  dist_type = "hamming",
  print_message = TRUE
)

Arguments

adj_mat_qry

a binary adjacency matrix generated with network_rescale and network_make_binary.

adj_mat_sbj

a binary adjacency matrix with the same genes as in adj_mat_qry, but with differnt binary edge weights generated with network_rescale and network_make_binary.

dist_type

a distance method that shall be applied on the binary values for each gene. Available options are:

  • dist_type = "hamming": computes the hamming.distance for each gene between the two input matrices

  • dist_type = "jaccard": computes the jaccard for each gene between the two input matrices

print_message

shall massages be printed? Default is print_message = TRUE.

Author(s)

Hajk-Georg Drost

Examples

## Import and rescale PIDC network
# path to PIDC output file
pidc_output <- system.file('beeline_examples/PIDC/outFile.txt', package = 'edgynode')
# import PIDC specific output
pidc_parsed <- pidc(pidc_output)
#Set diagonal values
diag(pidc_parsed) <- 1
# rescaling PIDC output
pidc_rescaled <- network_rescale(pidc_parsed)
pidc_binary_adj_mat <- network_make_binary(pidc_rescaled, threshold = "median")
# compute hamming distances for each gene between input matrices
network_dist_pairwise_genes(pidc_binary_adj_mat, 
pidc_binary_adj_mat, dist_type = "hamming")

# compute jaccard distances for each gene between input matrices
network_dist_pairwise_genes(pidc_binary_adj_mat, 
pidc_binary_adj_mat, dist_type = "jaccard")

drostlab/edgynode documentation built on March 29, 2024, 10:36 a.m.