network_dist_pairwise_genes.Rd
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
).
network_dist_pairwise_genes( adj_mat_qry, adj_mat_sbj, dist_type = "hamming", print_message = TRUE )
adj_mat_qry | a binary adjacency matrix generated with |
---|---|
adj_mat_sbj | a binary adjacency matrix with the same genes as in |
dist_type | a distance method that shall be applied on the binary values for each gene. Available options are:
|
print_message | shall massages be printed? Default is |
Hajk-Georg Drost
## 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")#>#>#>#> UGR_qry_vs_UGR_sbj WT1mKTS_qry_vs_WT1mKTS_sbj #> 0 0 #> GATA4_qry_vs_GATA4_sbj WT1pKTS_qry_vs_WT1pKTS_sbj #> 0 0 #> FOXL2_qry_vs_FOXL2_sbj DMRT1_qry_vs_DMRT1_sbj #> 0 0 #> DKK1_qry_vs_DKK1_sbj RSPO1_qry_vs_RSPO1_sbj #> 0 0 #> CTNNB1_qry_vs_CTNNB1_sbj WNT4_qry_vs_WNT4_sbj #> 0 0 #> NR0B1_qry_vs_NR0B1_sbj SRY_qry_vs_SRY_sbj #> 0 0 #> NR5A1_qry_vs_NR5A1_sbj DHH_qry_vs_DHH_sbj #> 0 0 #> PGD2_qry_vs_PGD2_sbj AMH_qry_vs_AMH_sbj #> 0 0 #> FGF9_qry_vs_FGF9_sbj SOX9_qry_vs_SOX9_sbj #> 0 0 #> CBX2_qry_vs_CBX2_sbj #> 0# compute jaccard distances for each gene between input matrices network_dist_pairwise_genes(pidc_binary_adj_mat, pidc_binary_adj_mat, dist_type = "jaccard")#>#>#>#> UGR_qry_vs_UGR_sbj WT1mKTS_qry_vs_WT1mKTS_sbj #> 1 1 #> GATA4_qry_vs_GATA4_sbj WT1pKTS_qry_vs_WT1pKTS_sbj #> 1 1 #> FOXL2_qry_vs_FOXL2_sbj DMRT1_qry_vs_DMRT1_sbj #> 1 1 #> DKK1_qry_vs_DKK1_sbj RSPO1_qry_vs_RSPO1_sbj #> 1 1 #> CTNNB1_qry_vs_CTNNB1_sbj WNT4_qry_vs_WNT4_sbj #> 1 1 #> NR0B1_qry_vs_NR0B1_sbj SRY_qry_vs_SRY_sbj #> 1 1 #> NR5A1_qry_vs_NR5A1_sbj DHH_qry_vs_DHH_sbj #> 1 1 #> PGD2_qry_vs_PGD2_sbj AMH_qry_vs_AMH_sbj #> 1 1 #> FGF9_qry_vs_FGF9_sbj SOX9_qry_vs_SOX9_sbj #> 1 1 #> CBX2_qry_vs_CBX2_sbj #> 1