9.3 Assess the quality of networks

9.3.1 Introduction to the network file by SJARACNe

The core output of SJARACNe is the network file named consensus_network_ncol_.txt. It contains 9 columns:

  • source: ID of the source gene, can be the gene symbol;
  • target: ID of the target gene, can be the gene symbol;
  • source.symbol: symbol of the source gene;
  • target.symbol: symbol of the target gene;
  • MI: mutual information of source-gene pair;
  • pearson: Pearson correlation coefficient, [-1,1]
  • pearson: Spearman correlation coefficient, [-1,1]
  • slope: slop of the regression line, returned by stats.linregression()
  • p.value: p-value for a hypothesis test whose null hypothesis is that the slope is zero, using Wald Test with t-distribution of the test statistic
network_format <- read.table(system.file("extdata/demo_pbmc14k/PBMC14k/SJARACNe/B/TF/bt100_pc001/consensus_network_ncol_.txt", package = "scMINER"),
                             header = T, sep = "\t", quote = "", stringsAsFactors = F)
head(network_format)
##   source     target source.symbol target.symbol     MI pearson spearman   slope
## 1   AATF      ACBD3          AATF         ACBD3 0.0509 -0.0310  -0.0311 -0.0193
## 2   AATF       ADD3          AATF          ADD3 0.0486  0.0228   0.0258  0.0307
## 3   AATF        AES          AATF           AES 0.0511  0.0311   0.0289  0.0668
## 4   AATF     AKR7A2          AATF        AKR7A2 0.0498  0.0319   0.0366  0.0421
## 5   AATF AL928768.3          AATF    AL928768.3 0.0447  0.0247   0.0293  0.0335
## 6   AATF       ALG8          AATF          ALG8 0.0479  0.0358   0.0373  0.0234
##   p.value
## 1  0.1761
## 2  0.3204
## 3  0.1756
## 4  0.1646
## 5  0.2815
## 6  0.1183

9.3.2 Generate network QC report

There is no simple standards to tell the reliability of networks. Empirically, a network with 50-300 target size is good. scMINER provides a function, drawNetworkQC(), to quickly assess the quality of networks in batch.

network_stats <- drawNetworkQC(sjaracne_dir = "/work-path/PBMC14K/SJARACNe", generate_html = FALSE) # Set `generate_html = TRUE` to generate html-format QC report for each network file
## The network QC statistics table is saved seperately, for demonstration purposes.
network_stats <- readRDS(system.file("extdata/demo_pbmc14k/PBMC14k/SJARACNe/network_stats.rds", package = "scMINER"))
head(network_stats)
##              network_tag network_node network_edge driver_count targetSize_mean
## 1      B.SIG.bt100_pc001         8572       391889         4148        94.47662
## 2       B.TF.bt100_pc001         8572        95341          835       114.18084
## 3 CD4TCM.SIG.bt100_pc001         8660       382153         4209        90.79425
## 4  CD4TCM.TF.bt100_pc001         8660        94319          838       112.55251
## 5  CD4TN.SIG.bt100_pc001         8612       401658         4180        96.09043
## 6   CD4TN.TF.bt100_pc001         8612        95152          831       114.50301
##   targetSize_median targetSize_minimum targetSize_maximum
## 1              94.0                 33                396
## 2              96.0                 64                913
## 3              91.0                 31                281
## 4              95.5                 60                689
## 5              95.0                 43                303
## 6              99.0                 64                743
##                                                                                                                                                                                               network_path
## 1      /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/B/SIG/bt100_pc001/sjaracne_workflow-df798096-8dee-4baf-8f70-891c689dc769/consensus_network_ncol_.txt
## 2       /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/B/TF/bt100_pc001/sjaracne_workflow-fb2a69b9-f98e-47ff-87a0-6d538822fc6e/consensus_network_ncol_.txt
## 3 /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/CD4TCM/SIG/bt100_pc001/sjaracne_workflow-424f1068-13d1-4f0e-9c26-56acd9a2027c/consensus_network_ncol_.txt
## 4  /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/CD4TCM/TF/bt100_pc001/sjaracne_workflow-52b3cdf5-5914-4c8c-a77a-05f17c755d83/consensus_network_ncol_.txt
## 5  /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/CD4TN/SIG/bt100_pc001/sjaracne_workflow-7b5bb68e-1de5-4d0e-80ec-8d8aa037866f/consensus_network_ncol_.txt
## 6   /Volumes/projects/scRNASeq/yu3grp/scMINER/NG_Revision/QPan/scminer_R/Datasets/PBMC14K/SJARACNe/CD4TN/TF/bt100_pc001/sjaracne_workflow-89716541-eb53-435c-8a45-bab63d6b5198/consensus_network_ncol_.txt