diff --git a/vignettes/.gitignore b/vignettes/.gitignore deleted file mode 100644 index 097b241..0000000 --- a/vignettes/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.html -*.R diff --git a/vignettes/NetVA.Rmd b/vignettes/NetVA.Rmd deleted file mode 100644 index dae5822..0000000 --- a/vignettes/NetVA.Rmd +++ /dev/null @@ -1,229 +0,0 @@ ---- -title: "NetVA: an R package for network vulnerability and influence analysis" -author: "Swapnil Kumar, Grace Pauline, and Vaibhav Vindal^[Department of Biotechnology & Bioinformatics, University of Hyderabad, India.]" -date: "`r Sys.Date()`" -output: rmarkdown::html_vignette -#output: pdf_document -vignette: > - %\VignetteIndexEntry{NetVA: an R package for network vulnerability and influence analysis} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- - -`NetVA` is a fast and open source library/package for the analysis of networks. The package consists of a core written in [R](https://github.com/kr-swapnil/NetVA). This vignette aims to give you an overview of the functions available in the `NetVA` package. - -*** -**NOTE:** Throughout this tutorial, we will use words `graph` and `network` as synonyms, and also `vertex`, `node` or 'protein' as synonyms. - -*** - -## Installation -To install the package from GitHub, use either: -```{r echo = TRUE, eval = FALSE} -install.packages("remotes") -remotes::install_github("kr-swapnil/NetVA") -``` -or -```{r echo = TRUE, eval = FALSE} -install.packages("devtools") -devtools::install_github("kr-swapnil/NetVA") -``` - -More details on dependencies, requirements, and troubleshooting on installation are found on the main [documentation page](https://github.com/kr-swapnil/NetVA). - -## Usage -To use `NetVA` in your R code, you must first load the package: - -```{r echo = FALSE} -knitr::opts_chunk$set(fig.width=6, fig.height=6) -``` - -```{r setup} -library("NetVA") -``` - -Now you have all `NetVA` functions available. - -##```{r setup, include = FALSE} -##knitr::opts_chunk$set( -## collapse = TRUE, -## comment = "#>" -##) -##``` - -## Network vulnerability analysis -`NetVA` offers `netva` function to perform vulnerability analysis of any given network, e.g., a protein-protein interaction network: - -```{r} -#Load protein-protein interactions of breast cancer available within this package as igraph object: -data(bca_ppi) -bc.net <- bca_ppi - -#Read graph/network from TXT and CSV files: -#From TXT file, it should not have header/column names -#bc.net <- read.graph("BRCA_100ppi.txt", format = "ncol") - -#Convert a data.frame to a graph object: -#From TXT/CSV file, if TXT/CSV file has header/column names, then head = TRUE -#bc.net <- read.table("BRCA_100ppi.txt", head = FALSE) #TXT to data.frame -#bc.net <- read.csv("BRCA_100ppi.csv", head = FALSE) #CSV to data.frame - -#bc.net <- graph.data.frame(bc.net, directed = FALSE) #data.frame to graph object - -#Store name of all vertices in vl as character vector -vl <- vertex_attr(bc.net)$name - -#Run netva using single core/default option for one protein or more than one protein at once -##Compatible with all Linux, macOS, and Windows machines -## Syntax: netva(vl, net, ncore = 1), where vl is the vector or list of nodes, node pairs, or node triplets, net is the network from which nodes will be deleted, and ncore is the number of cores for parallel processing by forking the job in multiple parts. - -netva.res <- netva(vl[c(1, 6)], bc.net) #Two proteins, i.e., 1st and 6th at once -netva.res <- netva(vl[c(1, 3, 7)], bc.net) #Three proteins, i.e., 1st, 3rd, and 7th at once - -#Run netva using single core/default option for all proteins one by one individually (compatible with all Linux, macOS, and Windows machines) -#netva.res <- netva(vl, bc.net) - -#Run netva using multiple core option for all proteins one by one individually (compatible only with all Linux and macOS machines) -#netva.res <- netva(vl, bc.net, ncore = 30) - -#Detect vulnerable proteins (VPs) based on each property one by one -## Syntax: detect(v, t, p), where v is the vector of node/protein names, t is the vector of topological property values for all nodes with same length and order of values as of v, and p is the three letter keyword for corresponding topological property. - -#abc.outliers <- detectVNs(vl, netva.res[,1], "ABC") #Average betweenness -#acc.outliers <- detectVNs(vl, netva.res[,2], "ACC") #Average closeness -#aec.outliers <- detectVNs(vl, netva.res[,3], "AEC") #Average eccentricity -#anc.outliers <- detectVNs(vl, netva.res[,4], "ANC") #Average node connectivity -#apl.outliers <- detectVNs(vl, netva.res[,5], "APL") #Average path length -#apn.outliers <- detectVNs(vl, netva.res[,6], "APN") #Articulation point -#cco.outliers <- detectVNs(vl, netva.res[,7], "CCO") #Clustering coefficient -#coh.outliers <- detectVNs(vl, netva.res[,8], "COH") #Cohesiveness -#com.outliers <- detectVNs(vl, netva.res[,9], "COM") #Compactness -#gef.outliers <- detectVNs(vl, netva.res[,10], "GEF") #Global efficiency -#het.outliers <- detectVNs(vl, netva.res[,11], "HET") #Heterogeneity -#nce.outliers <- detectVNs(vl, netva.res[,12], "NCE") #Network centralization -#nde.outliers <- detectVNs(vl, netva.res[,13], "NDE") #Network density -#ndi.outliers <- detectVNs(vl, netva.res[,14], "NDI") #Network diameter - -#Vulnerability analysis for the detection of vulnerable node/protein pairs (VPPs) -##(1) For random pairs of nodes which may or may not be connected with each other in the network -np.list = combn(vl[1:100], 2, simplify = FALSE) -length(np.list) -#netva.res <- netva(np.list, bc.net, ncore = 30) - -##(2) For those pairs of nodes that are connected with each other in the network -###Detection of connected pairs of nodes in the network (only for hundred nodes) -vl2 = t(combn(vl[1:100], 2)) -dim(vl2) -np.list = list() -l = 0 -#for(i in 1:dim(vl2)[1]){ -# k = are_adjacent(bc.net, vl2[i,1], vl2[i,2]) -# if(k == TRUE){ -# l = l + 1 -# np.list[[l]] = as.character(vl2[i,]) -# } -#} -length(np.list) -#netva.res <- netva(np.list, bc.net, ncore = 30) - -#Detect vulnerable protein pairs (VPPs) based on each property one by one -#abc.outliers <- detectVNs(rownames(netva.res), netva.res[,1], "ABC") #Average betweenness -#acc.outliers <- detectVNs(rownames(netva.res), netva.res[,2], "ACC") #Average closeness -#aec.outliers <- detectVNs(rownames(netva.res), netva.res[,3], "AEC") #Average eccentricity -#anc.outliers <- detectVNs(rownames(netva.res), netva.res[,4], "ANC") #Average node connectivity -#apl.outliers <- detectVNs(rownames(netva.res), netva.res[,5], "APL") #Average path length -#apn.outliers <- detectVNs(rownames(netva.res), netva.res[,6], "APN") #Articulation point -#nce.outliers <- detectVNs(rownames(netva.res), netva.res[,7], "NCE") #Network centralization -#cco.outliers <- detectVNs(rownames(netva.res), netva.res[,8], "CCO") #Clustering coefficient -#coh.outliers <- detectVNs(rownames(netva.res), netva.res[,9], "COH") #Cohesiveness -#com.outliers <- detectVNs(rownames(netva.res), netva.res[,10], "COM") #Compactness -#gef.outliers <- detectVNs(rownames(netva.res), netva.res[,11], "GEF") #Global efficiency -#het.outliers <- detectVNs(rownames(netva.res), netva.res[,12], "HET") #Heterogeneity -#nde.outliers <- detectVNs(rownames(netva.res), netva.res[,13], "NDE") #Network density -#ndi.outliers <- detectVNs(rownames(netva.res), netva.res[,14], "NDI") #Network diameter -``` - -Three letter keywords for corresponding topological properties include the following: - -| Keyword | Topology | -|---------------------------|--------------------------------------------------| -| `APN` | Articulation point | -| `ABC` | Average betweenness centrality | -| `ACC` | Average closeness centrality | -| `AEC` | Average eccentricity | -| `APL` | Average path length | -| `ANC` | Average node connectivity | -| `CCO` | Clustering coefficient | -| `COH` | Cohesiveness | -| `COM` | Compactness | -| `GEF` | Global efficiency | -| `HET` | Heterogeneity | -| `NCE` | Network centralization | -| `NDE` | Network density | -| `NDI` | Network diameter | - - -## Network influence analysis -`NetVA` offers `evc` and `detectINs` functionality to perform influence analysis of any given network, e.g., a protein-protein interaction network: -```{r} -#Calculate the values of EVC and EVC+ for all nodes present in the network: -#evc.res = evc(bc.net) - -#Detect influential proteins (IPs) based on EVC and EVC+: -#ip.list = detectINs(bc.net) -``` - -## Hubs and bottlenecks in a network -`NetVA` offers `detectHubs` and `detectBottlenecks` function to identify Hubs for a given network, e.g., a protein-protein interaction network: -```{r} -#hubs <- detectHubs(net = bc.net, method = "ETP", p = 20, validate = TRUE, perturb = 5, iter = round(100/perturb), ng = iter) - -hubs <- detectHubs(net = bc.net) -head(hubs) -``` - -```{r} -#bots <- detectBottlenecks(net = bc.net, method = "ETP", p = 20, validate = TRUE, perturb = 5, iter = round(100/perturb), ng = iter) - -bots <- detectBottlenecks(net = bc.net) -head(bots) -``` - -## Heterogeneity of networks -`NetVA` offers `netva` function to perform vulnerability analysis of any given network, e.g., a protein-protein interaction network: -```{r} -#Calculate the value of heterogeneity of a network: -net.het <- heterogeneity(bc.net) -``` - -## Cohesiveness and compactness of networks -`NetVA` offers functionality to calculate Cohesiveness and Compactness of any given network, e.g., a protein-protein interaction network: -```{r} -#Cohesiveness of complete network: -#coh.cent <- cohesiveness(net = bc.net) - -#Cohesiveness of a network after removal of a particular node, e.g., "UBC": -#coh.cent <- cohesiveness(v = "UBC", net = bc.net) -``` - -```{r} -#Compactness of complete network: -#com.cent <- compactness(net = bc.net) - -#Compactness of a network after removal of a particular node, e.g., "UBC": -#com.cent <- compactness(v = "UBC", net = bc.net) -``` - -## Where to go next - -This tutorial is a brief introduction to `NetVA`. We sincerely hope you enjoyed reading it and that it will be useful for your own network analyses. - -For a detailed description of specific functions, see corresponding help documentation using `help` function and . To report a bug, open a [Github issue](https://github.com/kr-swapnil/NetVA/issues). Please do not ask usage questions on Github directly. - -## Session info - -For the sake of reproducibility, the session information for the code above is the following: - -```{r session-info} -sessionInfo() -``` diff --git a/vignettes/NetVA.html b/vignettes/NetVA.html deleted file mode 100644 index 865c35a..0000000 --- a/vignettes/NetVA.html +++ /dev/null @@ -1,996 +0,0 @@ - - - - - - - - - - - - - - - - -NetVA: an R package for network vulnerability and influence analysis - - - - - - - - - - - - - - - - - - - - - - - - - -

NetVA: an R package for network -vulnerability and influence analysis

-

Swapnil Kumar, Grace Pauline, and Vaibhav Vindal1

-

2023-10-26

- - - -

NetVA is a fast and open source library/package for the -analysis of networks. The package consists of a core written in R. This vignette aims to -give you an overview of the functions available in the -NetVA package.

-
-

NOTE: Throughout this tutorial, we will use words -graph and network as synonyms, and also -vertex, node or ‘protein’ as synonyms.

-
-
-

Installation

-

To install the package from GitHub, use either:

-
install.packages("remotes")
-remotes::install_github("kr-swapnil/NetVA")
-

or

-
install.packages("devtools")
-devtools::install_github("kr-swapnil/NetVA")
-

More details on dependencies, requirements, and troubleshooting on -installation are found on the main documentation page.

-
-
-

Usage

-

To use NetVA in your R code, you must first load the -package:

-
library("NetVA")
-
## Loading required package: igraph
-
## 
-## Attaching package: 'igraph'
-
## The following objects are masked from 'package:stats':
-## 
-##     decompose, spectrum
-
## The following object is masked from 'package:base':
-## 
-##     union
-

Now you have all NetVA functions available.

-

##{r setup, include = FALSE} ##knitr::opts_chunk$set( ## collapse = TRUE, ## comment = "#>" ##) ##

-
-
-

Network vulnerability analysis

-

NetVA offers netva function to perform -vulnerability analysis of any given network, e.g., a protein-protein -interaction network:

-
#Load protein-protein interactions of breast cancer available within this package as igraph object:
-data(bca_ppi)
-bc.net <- bca_ppi
-
-#Read graph/network from TXT and CSV files:
-#From TXT file, it should not have header/column names
-#bc.net <- read.graph("BRCA_100ppi.txt", format = "ncol")
-
-#Convert a data.frame to a graph object:
-#From TXT/CSV file, if TXT/CSV file has header/column names, then head = TRUE
-#bc.net <- read.table("BRCA_100ppi.txt", head = FALSE) #TXT to data.frame
-#bc.net <- read.csv("BRCA_100ppi.csv", head = FALSE) #CSV to data.frame
-
-#bc.net <- graph.data.frame(bc.net, directed = FALSE) #data.frame to graph object
-
-#Store name of all vertices in vl as character vector
-vl <- vertex_attr(bc.net)$name
-
## This graph was created by an old(er) igraph version.
-##   Call upgrade_graph() on it to use with the current igraph version
-##   For now we convert it on the fly...
-
#Run netva using single core/default option for one protein or more than one protein at once
-##Compatible with all Linux, macOS, and Windows machines
-## Syntax: netva(vl, net, ncore = 1), where vl is the vector or list of nodes, node pairs, or node triplets, net is the network from which nodes will be deleted, and ncore is the number of cores for parallel processing by forking the job in multiple parts.
-
-netva.res <- netva(vl[c(1, 6)], bc.net) #Two proteins, i.e., 1st and 6th at once
-
## *** NetVA v1.0.0 with normal mode ***
-
netva.res <- netva(vl[c(1, 3, 7)], bc.net) #Three proteins, i.e., 1st, 3rd, and 7th at once
-
## *** NetVA v1.0.0 with normal mode ***
-
#Run netva using single core/default option for all proteins one by one individually (compatible with all Linux, macOS, and Windows machines)
-#netva.res <- netva(vl, bc.net)
-
-#Run netva using multiple core option for all proteins one by one individually (compatible only with all Linux and macOS machines)
-#netva.res <- netva(vl, bc.net, ncore = 30)
-
-#Detect vulnerable proteins (VPs) based on each property one by one
-## Syntax: detect(v, t, p), where v is the vector of node/protein names, t is the vector of topological property values for all nodes with same length and order of values as of v, and p is the three letter keyword for corresponding topological property.
-
-#abc.outliers <- detectVNs(vl, netva.res[,1], "ABC") #Average betweenness
-#acc.outliers <- detectVNs(vl, netva.res[,2], "ACC") #Average closeness
-#aec.outliers <- detectVNs(vl, netva.res[,3], "AEC") #Average eccentricity
-#anc.outliers <- detectVNs(vl, netva.res[,4], "ANC") #Average node connectivity
-#apl.outliers <- detectVNs(vl, netva.res[,5], "APL") #Average path length
-#apn.outliers <- detectVNs(vl, netva.res[,6], "APN") #Articulation point
-#cco.outliers <- detectVNs(vl, netva.res[,7], "CCO") #Clustering coefficient
-#coh.outliers <- detectVNs(vl, netva.res[,8], "COH") #Cohesiveness
-#com.outliers <- detectVNs(vl, netva.res[,9], "COM") #Compactness
-#gef.outliers <- detectVNs(vl, netva.res[,10], "GEF") #Global efficiency
-#het.outliers <- detectVNs(vl, netva.res[,11], "HET") #Heterogeneity
-#nce.outliers <- detectVNs(vl, netva.res[,12], "NCE") #Network centralization
-#nde.outliers <- detectVNs(vl, netva.res[,13], "NDE") #Network density
-#ndi.outliers <- detectVNs(vl, netva.res[,14], "NDI") #Network diameter
-
-#Vulnerability analysis for the detection of vulnerable node/protein pairs (VPPs)
-##(1) For random pairs of nodes which may or may not be connected with each other in the network
-np.list = combn(vl[1:100], 2, simplify = FALSE)
-length(np.list)
-
## [1] 4950
-
#netva.res <- netva(np.list, bc.net, ncore = 30)
-
-##(2) For those pairs of nodes that are connected with each other in the network
-###Detection of connected pairs of nodes in the network (only for hundred nodes)
-vl2 = t(combn(vl[1:100], 2))
-dim(vl2)
-
## [1] 4950    2
-
np.list = list()
-l = 0
-#for(i in 1:dim(vl2)[1]){
-#   k = are_adjacent(bc.net, vl2[i,1], vl2[i,2])
-#   if(k == TRUE){
-#       l = l + 1
-#       np.list[[l]] = as.character(vl2[i,])
-#   }
-#}
-length(np.list)
-
## [1] 0
-
#netva.res <- netva(np.list, bc.net, ncore = 30)
-
-#Detect vulnerable protein pairs (VPPs) based on each property one by one
-#abc.outliers <- detectVNs(rownames(netva.res), netva.res[,1], "ABC") #Average betweenness
-#acc.outliers <- detectVNs(rownames(netva.res), netva.res[,2], "ACC") #Average closeness
-#aec.outliers <- detectVNs(rownames(netva.res), netva.res[,3], "AEC") #Average eccentricity
-#anc.outliers <- detectVNs(rownames(netva.res), netva.res[,4], "ANC") #Average node connectivity
-#apl.outliers <- detectVNs(rownames(netva.res), netva.res[,5], "APL") #Average path length
-#apn.outliers <- detectVNs(rownames(netva.res), netva.res[,6], "APN") #Articulation point
-#nce.outliers <- detectVNs(rownames(netva.res), netva.res[,7], "NCE") #Network centralization
-#cco.outliers <- detectVNs(rownames(netva.res), netva.res[,8], "CCO") #Clustering coefficient
-#coh.outliers <- detectVNs(rownames(netva.res), netva.res[,9], "COH") #Cohesiveness
-#com.outliers <- detectVNs(rownames(netva.res), netva.res[,10], "COM") #Compactness
-#gef.outliers <- detectVNs(rownames(netva.res), netva.res[,11], "GEF") #Global efficiency
-#het.outliers <- detectVNs(rownames(netva.res), netva.res[,12], "HET") #Heterogeneity
-#nde.outliers <- detectVNs(rownames(netva.res), netva.res[,13], "NDE") #Network density
-#ndi.outliers <- detectVNs(rownames(netva.res), netva.res[,14], "NDI") #Network diameter
-

Three letter keywords for corresponding topological properties -include the following:

- ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeywordTopology
APNArticulation point
ABCAverage betweenness centrality
ACCAverage closeness centrality
AECAverage eccentricity
APLAverage path length
ANCAverage node connectivity
CCOClustering coefficient
COHCohesiveness
COMCompactness
GEFGlobal efficiency
HETHeterogeneity
NCENetwork centralization
NDENetwork density
NDINetwork diameter
-
-
-

Network influence analysis

-

NetVA offers evc and detectINs -functionality to perform influence analysis of any given network, e.g., -a protein-protein interaction network:

-
#Calculate the values of EVC and EVC+ for all nodes present in the network:
-#evc.res = evc(bc.net)
-
-#Detect influential proteins (IPs) based on EVC and EVC+:
-#ip.list = detectINs(bc.net)
-
-
-

Hubs and bottlenecks in a network

-

NetVA offers detectHubs and -detectBottlenecks function to identify Hubs for a given -network, e.g., a protein-protein interaction network:

-
#hubs <- detectHubs(net = bc.net, method = "ETP", p = 20, validate = TRUE, perturb = 5, iter = round(100/perturb), ng = iter)
-
-hubs <- detectHubs(net = bc.net)
-head(hubs)
-
## $hubs.bp
-##     ERBB2    HNRNPK      EZH2     SF3A2   SNRNP70      NCK1       CBL       LYN 
-##       179       214       254       132       101       166       184       138 
-##       JUN      FHL2     SMAD4     SMAD1     SMAD2     SMAD3      RHOA     EP300 
-##       179        97       134       108       282       302       102       391 
-##    CDKN2A    PIK3R1     PLCG1     UBE2I     PRMT1    SETDB1    TFAP2A     PARP1 
-##       150       185       135       296       124       120        99       213 
-##     SF3B1       APC       PHB      PCNA     PSMA3     MAPK1    EEF1A1     C1QBP 
-##       143       136       102       234       218       182       292       140 
-##       SRC      EIF6    GNB2L1     EWSR1     CALM1    PPP1CA      RPA2       RB1 
-##       275       164       154       196       167       244       409       189 
-##      RXRA     PPARG     PSMC5     RPS25     RPS13     RPLP1      DDX5     ARRB1 
-##       108       134       123       114       148       101       187       211 
-##    TRIM23     SNRPB     ARRB2     YWHAQ     EPB41       APP    SPTAN1     SDCBP 
-##       110        98       285       358       119      1538       127       124 
-##      GRB2       SP1      ABL1      E2F1     HDAC6       MYC     CASP8      DAXX 
-##       665       202       233       119       185       777       103        97 
-##    NOTCH1     SIAH1    TUBA4A      TP53     KPNA2     AURKA      CHD3  TNFRSF1A 
-##       167       129        98       833       146       166       126       149 
-##     PSMD2  TNFRSF1B     U2AF1      CDH1     ITGA4      ENO1       VIM      FLNA 
-##       172       103       103       107       438       237       198       140 
-##       VHL      RPL7    RAD23A     IGBP1     USP11       FYN      XIAP      NONO 
-##       383       147       134       112       100       199       115       138 
-##      SKP1     IKBKG   SUV39H1     UBE3A     YWHAE     NEDD4   SH3KBP1       EMD 
-##       162       349       114       114       316       221       180       119 
-##      E2F3       YY1       TBP    CREBBP       AES      UPF1     CTBP1     ATXN1 
-##       144       128       129       261       102       113       100       222 
-##    MAPK14      IMMT       ATM      ARF6    HSPA1A     HSPA9     STAT1   SMARCA4 
-##       144        97       124       138       162       174       137       177 
-##      SHC1   PPP2R1A      CHUK     KPNB1    HNRNPL     PTBP1     HSPA4      PTK2 
-##       171       170       132       137        97       108       251       103 
-##      RARA     HDAC3     NCOR1     TERF1       VCP     AP2M1    SNRPD2    SNRPD1 
-##       119       178       149       261       496        99        98       111 
-##     NR3C1     MAPK8       RAN     YWHAH     PCBP1    HNRNPD      MTOR     HDAC1 
-##       164       131        99       183        99       167       111       398 
-##   PRPF40A     YWHAZ     YWHAB       SFN    NHP2L1    TSG101     BRCA1     CDC20 
-##       148       595       326       167       108       129       464       117 
-##    UBE2L3     PSMD4     TRAF1     BIRC2    TRIM28       VDR     MAPK3      MCM3 
-##       101       125       154        97       188        98       118       109 
-##     TRAF2      CDK9     SUMO1     PSMB1     TERF2      RAC1      PLK1     SUMO3 
-##       270       167      1036       111       227       135       154       799 
-##      TCF4    TADA2A     HDAC5     HSPB1     TRAF6       ILK   KHDRBS1      XPO1 
-##       137       133       322       292       457       148       129       159 
-##    GOLGA2     MAGOH     CDC5L      NXF1     PSMA7    PRKAB1    DNAJA1    POLR2A 
-##       235       186       584      1062       100       157       109       236 
-##      PIN1    UBE2E1     TRIP6     SAP18    UBE2D1     UBE2N     PSMA1     SUMO2 
-##       198       103       113       101       209       156       147      1547 
-##     HDAC2     NEDD8      DHX9     EEF1G     HIF1A      BTRC     RPS10      RPL5 
-##       257       689       214       135       140       160       118       161 
-##     RPS20     GSK3B     HSPA8     IKBKE       HGS       PML     HDAC4      CBX5 
-##       131       236       296       350       170       171       114       143 
-##    PABPC1    NUDT21      DDB1     YWHAG     DISC1     RBM39     RPL14      FXR2 
-##       175       103       225       301       106       139       126        98 
-##       CRK   CSNK2A1      CCT5    EIF4A3   CSNK2A2   SYNCRIP  HSP90AB1    CSNK2B 
-##       190       324       105       233       124       140       501       215 
-##      CUL7      RBX1  CALCOCO2     RNF11      RNF2       UBC      SFPQ   TSC22D1 
-##       600       141       133        97       658      8222       148       152 
-##    TRIM27       EED    PPP1CC       SET     SIN3A    RUVBL1    CTNNB1     UCHL5 
-##       227       448       216       107       166       186       301       136 
-##  HNRNPUL1      RIF1      ECT2    CDKN1A      CDK2      CDK1      MCM7    PPP2CA 
-##       112       124       140       247       520       150       206       167 
-##      RPSA     CDC42      ESR1       HTT     RPL24     STAT3      ILF3       FUS 
-##       146       139       575       264       132       175       300       282 
-##      LMNA      KAT5      BMI1     GAPDH       FN1      NPM1     HSPD1     U2AF2 
-##       213       174       333       163       653       378       164       139 
-##      CLTC      LIG4   HNRNPA1    NFKBIA   SLC25A5     NFKB2     PSMD1    MAP3K3 
-##       150       116       259       120       140       153       109       171 
-##      BCL2      ACTB     ACTG1      MDFI      MLH1      CDK4     EEF1D     RPS14 
-##       100       275       109       154       131       120       114       144 
-##     HSPA5  HSP90AA1     ISG15     XRCC6    HNRNPM    PSMD11    HNRNPC      SGTA 
-##       282       613       184       238       232       101       157       105 
-##      RPA1       TK1     SRPK2      RBMX   CCDC85B     SHFM1    SQSTM1      QARS 
-##       430       140       197       100       102       132       201       106 
-##     STUB1    UBE2D3      SNW1     RPL23     RPS26      BAG3    UBQLN1   GABARAP 
-##       191       169       594       145       112       358       158       431 
-##     CREB3     RBPMS     COPS6       UBB      CCT7      CCT3      MSH2     CIAO1 
-##       109       113       262       130        98       123        97       105 
-##      RPL8   DCUN1D1     SF3B4     KDM1A GABARAPL2      LNX1    RPL18A     DDX17 
-##       122       200        99       230       471       171       115       125 
-##      WDR5    RUVBL2  MAP1LC3B     PUF60     NFKB1       FOS      ATF2     PSMA2 
-##       139       208       335       108       185       146       211       106 
-##     PSMA6    PAXIP1      YBX1      MYH9      USP7      AKT1      CUL1      CUL5 
-##       119       237       252       117       190       229       566       337 
-##      CUL2      MDM2     ATP5B       FBL      CAV1      RPS6     RPL22     RPL12 
-##       367       707        99       135       122       182       104       121 
-##     RPS3A     RPLP0    SPTBN1     RPL7A      UBA1   HNRNPH1   SMARCB1     H2AFX 
-##       186       147        98       137       158       151       106       216 
-##     RBBP4      RPL9    EFTUD2     PRMT5     AURKB    TARDBP      CD81     SF3B3 
-##       150       120       128       125       132       278       166       150 
-##      ILF2     RPL15     RPS19      PAK2      TOP1      RELA     EPAS1   TP53BP1 
-##       220       124       137       102       128       303       110       125 
-##      DDX1     RNPS1    UBQLN4  SNRNP200      TCF3     PSMC2    UBE2D2     HUWE1 
-##       121       153       144       129       114       103       177       385 
-##    NEDD4L   DYNC1H1    CEP250       NCL    ATP5A1      RAF1    TUBA1A      ICT1 
-##       128       113       210       223       103       141       155       251 
-##     VCAM1      YAP1     PTBP3      POT1     COPS5   ATP6V1A      HDGF      RPL3 
-##       597       120       264       162       665        97       173       126 
-##     DHX15     KAT2A     DDX3X     RPS11    RPL23A     SRSF1    MAP3K7       PKM 
-##       142       105       165       135       158       144       127       224 
-##     NOP56     MAPK6     IQCB1       MCC     IKBKB    HNRNPU    MAP3K1     SRPK1 
-##       123       153       155       226       140       288       135       198 
-##     CEP76     SHMT2      BAG6       UBD     STAU1     RBBP7      TUFM GABARAPL1 
-##       127       348       122       609       279       105       136       450 
-##    HNRNPF      RPS3    HNRNPR    PRKACA    AHCYL1     RAD21     USP9X    IQGAP1 
-##       132       201       165        97       104       192       104       117 
-##     SF3B2      BAG2    PRPF19      SKP2     EIF1B      RPA3      RPS9     RPS16 
-##       102       109       120       102       158       361       152       168 
-##     RPL31     EIF3A     OBSL1    PTP4A3     SF3A1     KAT2B     CUL4A     CUL4B 
-##       130       103       566        99       131       143       225       288 
-##     PRPF8      SLX4    SNRPA1     DDX21     RPS24     MOV10     UBXN1      RPL4 
-##       112       135        99       113       143       931        97       153 
-##   MAP3K14 HIST2H2BE   ZDHHC17     SRSF5     RPL13      RPS7     ICAM1     LRRK2 
-##       119       100       164       100       130       140       114       398 
-##  MAP1LC3A    RPL10A    ELAVL1     PRKDC     UBL4A      AGO1     XRCC5      EEF2 
-##       395       112      1620       235       260       180       176       130 
-##      RPS2      TCP1     RPS18 HNRNPA2B1     TUBG1     SRSF3      TNIK      TBK1 
-##       178       112       108       163       156       109       111       106 
-##   SMARCC1     RPL30      CBX3      RPS5      CUL3      CCT4      AGO2      RPS8 
-##        97       111        99       129      1056        99       201       174 
-##    RPS15A     RPS23     RPS4X     RPL11     RPL19    TUBB4B     SRSF7      CCT2 
-##       145       137       174       155       133       112        97       126 
-##      RPL6     RPL18      NUDC      MDC1     SUZ12     SIRT1     SRRM1     CDC37 
-##       163       143       109       176       318       208       125       211 
-##   TUBGCP3      PAN2    FBXW11    HDAC11     LRIF1      WWOX   MYBBP1A     MEPCE 
-##       115       318       135       125       115       211        97       164 
-##   SMARCC2     CAND1    FBXO25   TERF2IP     CEP70     SRRM2     MED19     LATS2 
-##       102       588       169       124       112       194       116       143 
-##      ITCH     MMS19     LZTS2     HECW2    SMURF1     WHSC1  SMARCAD1     SIRT7 
-##       118       177       142       257       239       134       122       640 
-##      LGR4      GRK5     FBXO6     IGSF8      TUBB     CCDC8  NOTCH2NL 
-##       161       155       565       138       206       513       142 
-## 
-## $hubs.ap
-##     ERBB2    HNRNPK      EZH2     SF3A2   SNRNP70      NCK1       CBL       LYN 
-##       179       214       254       132       101       166       184       138 
-##       JUN     SMAD4     SMAD1     SMAD2     SMAD3      RHOA    CDKN2A    PIK3R1 
-##       179       134       108       282       302       102       150       185 
-##     PLCG1     UBE2I     PRMT1    SETDB1     PARP1     SF3B1       APC       PHB 
-##       135       296       124       120       213       143       136       102 
-##      PCNA     PSMA3     MAPK1    EEF1A1     C1QBP       SRC      EIF6    GNB2L1 
-##       234       218       182       292       140       275       164       154 
-##     EWSR1     CALM1      RPA2       RB1      RXRA     PPARG     PSMC5     RPS25 
-##       196       167       409       189       108       134       123       114 
-##     RPS13     RPLP1      DDX5     ARRB1    TRIM23     SNRPB     ARRB2     YWHAQ 
-##       148       101       187       211       110        98       285       358 
-##     EPB41       APP    SPTAN1      GRB2      ABL1     HDAC6       MYC     CASP8 
-##       119      1538       127       665       233       185       777       103 
-##    NOTCH1     SIAH1    TUBA4A      TP53     KPNA2     AURKA      CHD3  TNFRSF1A 
-##       167       129        98       833       146       166       126       149 
-##     PSMD2     U2AF1      CDH1     ITGA4      ENO1       VIM       VHL      RPL7 
-##       172       103       107       438       237       198       383       147 
-##    RAD23A     IGBP1     USP11       FYN      XIAP      NONO      SKP1     IKBKG 
-##       134       112       100       199       115       138       162       349 
-##   SUV39H1     YWHAE     NEDD4   SH3KBP1       EMD      E2F3       YY1       TBP 
-##       114       316       221       180       119       144       128       129 
-##       AES      UPF1     CTBP1     ATXN1    MAPK14      IMMT       ATM      ARF6 
-##       102       113       100       222       144        97       124       138 
-##    HSPA1A     HSPA9     STAT1   SMARCA4      SHC1      CHUK     KPNB1    HNRNPL 
-##       162       174       137       177       171       132       137        97 
-##     PTBP1     HSPA4      PTK2      RARA     HDAC3     NCOR1     TERF1       VCP 
-##       108       251       103       119       178       149       261       496 
-##     AP2M1    SNRPD1     NR3C1     MAPK8       RAN     YWHAH     PCBP1    HNRNPD 
-##        99       111       164       131        99       183        99       167 
-##      MTOR     HDAC1     YWHAZ    NHP2L1    TSG101     BRCA1    UBE2L3     PSMD4 
-##       111       398       595       108       129       464       101       125 
-##     TRAF1    TRIM28       VDR     MAPK3     TRAF2      CDK9     PSMB1      RAC1 
-##       154       188        98       118       270       167       111       135 
-##      PLK1     SUMO3      TCF4    TADA2A     HDAC5     HSPB1     TRAF6       ILK 
-##       154       799       137       133       322       292       457       148 
-##   KHDRBS1     MAGOH     CDC5L      NXF1     PSMA7    PRKAB1    DNAJA1      PIN1 
-##       129       186       584      1062       100       157       109       198 
-##    UBE2E1    UBE2D1     UBE2N     PSMA1     SUMO2     HDAC2     NEDD8      DHX9 
-##       103       209       156       147      1547       257       689       214 
-##     HIF1A      BTRC     RPS10      RPL5     RPS20     GSK3B     HSPA8     IKBKE 
-##       140       160       118       161       131       236       296       350 
-##       HGS       PML     HDAC4      CBX5    PABPC1    NUDT21      DDB1     YWHAG 
-##       170       171       114       143       175       103       225       301 
-##     DISC1     RBM39     RPL14       CRK   CSNK2A1      CCT5    EIF4A3   CSNK2A2 
-##       106       139       126       190       324       105       233       124 
-##  HSP90AB1    CSNK2B      CUL7      RBX1  CALCOCO2     RNF11      RNF2       UBC 
-##       501       215       600       141       133        97       658      8222 
-##      SFPQ   TSC22D1    TRIM27       EED    PPP1CC       SET     SIN3A    RUVBL1 
-##       148       152       227       448       216       107       166       186 
-##    CTNNB1     UCHL5  HNRNPUL1      RIF1      ECT2    CDKN1A      CDK2      CDK1 
-##       301       136       112       124       140       247       520       150 
-##      MCM7    PPP2CA      RPSA     CDC42      ESR1     RPL24      ILF3       FUS 
-##       206       167       146       139       575       132       300       282 
-##      LMNA      KAT5      BMI1     GAPDH       FN1      NPM1     HSPD1     U2AF2 
-##       213       174       333       163       653       378       164       139 
-##      CLTC      LIG4   SLC25A5     NFKB2     PSMD1    MAP3K3     ACTG1      MLH1 
-##       150       116       140       153       109       171       109       131 
-##      CDK4     RPS14     HSPA5  HSP90AA1     ISG15     XRCC6    HNRNPM    PSMD11 
-##       120       144       282       613       184       238       232       101 
-##    HNRNPC      SGTA      RPA1       TK1     SRPK2      RBMX   CCDC85B     SHFM1 
-##       157       105       430       140       197       100       102       132 
-##    SQSTM1      QARS     STUB1    UBE2D3      SNW1     RPS26      BAG3    UBQLN1 
-##       201       106       191       169       594       112       358       158 
-##   GABARAP     RBPMS     COPS6       UBB      CCT3     CIAO1      RPL8   DCUN1D1 
-##       431       113       262       130       123       105       122       200 
-##     SF3B4     KDM1A      LNX1    RPL18A     DDX17      WDR5    RUVBL2  MAP1LC3B 
-##        99       230       171       115       125       139       208       335 
-##     PUF60     NFKB1      ATF2     PSMA2     PSMA6    PAXIP1      YBX1      MYH9 
-##       108       185       211       106       119       237       252       117 
-##      USP7      AKT1      CUL1      CUL5      CUL2      MDM2     RPL12     RPS3A 
-##       190       229       566       337       367       707       121       186 
-##     RPLP0     RPL7A      UBA1   HNRNPH1   SMARCB1     H2AFX     RBBP4      RPL9 
-##       147       137       158       151       106       216       150       120 
-##    EFTUD2     PRMT5     AURKB     SF3B3      ILF2     RPL15     RPS19      TOP1 
-##       128       125       132       150       220       124       137       128 
-##      RELA     EPAS1   TP53BP1      DDX1    UBQLN4  SNRNP200      TCF3     PSMC2 
-##       303       110       125       121       144       129       114       103 
-##    UBE2D2     HUWE1    NEDD4L   DYNC1H1    CEP250       NCL    ATP5A1      RAF1 
-##       177       385       128       113       210       223       103       141 
-##    TUBA1A      ICT1     VCAM1      YAP1     PTBP3   ATP6V1A      HDGF      RPL3 
-##       155       251       597       120       264        97       173       126 
-##     DHX15     KAT2A     DDX3X     RPS11    RPL23A     SRSF1    MAP3K7       PKM 
-##       142       105       165       135       158       144       127       224 
-##     NOP56     IQCB1       MCC     IKBKB    MAP3K1     SRPK1     CEP76     SHMT2 
-##       123       155       226       140       135       198       127       348 
-##      BAG6       UBD     STAU1     RBBP7      TUFM GABARAPL1    HNRNPF      RPS3 
-##       122       609       279       105       136       450       132       201 
-##    PRKACA    AHCYL1     RAD21     USP9X    IQGAP1     SF3B2      BAG2    PRPF19 
-##        97       104       192       104       117       102       109       120 
-##      SKP2     EIF1B      RPA3      RPS9     RPS16     RPL31     EIF3A     OBSL1 
-##       102       158       361       152       168       130       103       566 
-##    PTP4A3     SF3A1     KAT2B     CUL4A      SLX4    SNRPA1     DDX21     RPS24 
-##        99       131       143       225       135        99       113       143 
-##     MOV10     UBXN1      RPL4 HIST2H2BE   ZDHHC17     SRSF5     RPL13     ICAM1 
-##       931        97       153       100       164       100       130       114 
-##     LRRK2  MAP1LC3A    RPL10A     UBL4A      AGO1     XRCC5      EEF2      RPS2 
-##       398       395       112       260       180       176       130       178 
-##      TCP1     TUBG1      TNIK      TBK1   SMARCC1     RPL30      CBX3      RPS5 
-##       112       156       111       106        97       111        99       129 
-##      CUL3      CCT4      AGO2      RPS8    RPS15A     RPS23     RPS4X     RPL11 
-##      1056        99       201       174       145       137       174       155 
-##     RPL19     SRSF7      RPL6     RPL18      NUDC      MDC1     SUZ12     SIRT1 
-##       133        97       163       143       109       176       318       208 
-##   TUBGCP3      PAN2    FBXW11    HDAC11     LRIF1      WWOX     MEPCE   SMARCC2 
-##       115       318       135       125       115       211       164       102 
-##     CAND1    FBXO25   TERF2IP     CEP70     SRRM2     MED19     LATS2     MMS19 
-##       588       169       124       112       194       116       143       177 
-##     LZTS2     HECW2    SMURF1     WHSC1  SMARCAD1     SIRT7      LGR4      GRK5 
-##       142       257       239       134       122       640       161       155 
-##     IGSF8      TUBB     CCDC8  NOTCH2NL 
-##       138       206       513       142
-
#bots <- detectBottlenecks(net = bc.net, method = "ETP", p = 20, validate = TRUE, perturb = 5, iter = round(100/perturb), ng = iter)
-
-bots <- detectBottlenecks(net = bc.net)
-head(bots)
-
## $bottlenecks.bp
-##        EZH2         LYN       SMAD2       SMAD3       EP300      PIK3R1 
-##    40002.80    53723.06    70690.48    98159.89   112240.73    47949.07 
-##       UBE2I      SETDB1      TFAP2A       PSMA3      EEF1A1         SRC 
-##    62743.52    41935.86    61229.15    59206.77    53877.45    55156.71 
-##       EWSR1      PPP1CA        RPA2       YWHAQ         APP       SDCBP 
-##    49721.95   114395.49    52089.67    87572.71  2242273.84    36697.39 
-##        GRB2        ABL1         MYC        TP53        ENO1         VHL 
-##   338737.68    84440.85   404732.80   340569.02    35942.82    94376.18 
-##         FYN        SKP1       IKBKG       YWHAE     SH3KBP1      CREBBP 
-##    47131.13    37765.00    82494.42    64950.92    50372.72    64890.21 
-##       ATXN1       TERF1         VCP      HNRNPD       HDAC1       YWHAZ 
-##   122302.91    36168.66   120404.71    46668.01   121862.61   166609.44 
-##       YWHAB         SFN       BRCA1      TFAP2C      TRIM28       TRAF2 
-##   117281.52    51392.30   168515.73    72922.26    36242.06   111935.95 
-##       SUMO1       TERF2        RAC1       SUMO3        TCF4       HDAC5 
-##   502057.90    38907.43    36350.82   294186.52    70534.07    37524.53 
-##       HSPB1       TRAF6      GOLGA2       CDC5L        NXF1      POLR2A 
-##   102832.96    81041.89    81750.83   121356.64   757244.43    38613.02 
-##        PIN1       SUMO2       HDAC2       NEDD8       GSK3B       HSPA8 
-##    41085.44   845609.89    58064.09   166724.29    89347.23    41827.25 
-##        CBX5       YWHAG     CSNK2A1    HSP90AB1      CSNK2B        CUL7 
-##    72266.49    75683.53    65946.22   142586.61    77861.51    75002.63 
-##    CALCOCO2        RNF2         UBC      TRIM27         EED      PPP1CC 
-##    40086.18   174991.54 40116328.36    71004.16    58844.25   104585.29 
-##      CTNNB1      CDKN1A        CDK2        MCM7        ESR1         HTT 
-##    87356.18    42583.95    87319.36    49434.32   134591.34    84692.22 
-##        ILF3         FUS        KAT5        BMI1         FN1        NPM1 
-##    42199.65    50470.22    40385.61    54287.54   183215.29    76448.37 
-##        LIG4        ACTB        MDFI       EEF1D       HSPA5    HSP90AA1 
-##    44213.18    44240.11   116292.75    35770.34    36682.30   225745.34 
-##       XRCC6        SGTA        SPP1        RPA1         TK1       SRPK2 
-##    68025.12    68896.41    45755.29    52112.45    54003.79    69968.91 
-##        PEX5      SQSTM1        SNW1        BAG3       CDC23      UBQLN1 
-##    71280.76    38751.75   100900.38   232402.27    36421.44    82014.80 
-##     GABARAP       CREB3       COPS6       KDM1A   GABARAPL2        LNX1 
-##    61973.28    91123.78    55120.90    90879.36    89243.73    80706.10 
-##    MAP1LC3B         FOS       TFCP2      PAXIP1        AKT1        CUL1 
-##    43793.18    48532.59    43146.48    75572.74    50563.21   115015.59 
-##        CUL5        CUL2        MDM2        RELA      UBQLN4       HUWE1 
-##    41340.14    54680.47   185093.63    65737.86    64346.79    49342.89 
-##        ICT1       VCAM1       PTBP3        POT1       COPS5         PKM 
-##    59642.09    65747.17    71968.87    61243.77   173486.57    50186.90 
-##       MAPK6       IQCB1       SRPK1       SHMT2        BAG6         UBD 
-##    45561.80    39208.97    95901.02   131051.50    43114.51   212065.17 
-##   GABARAPL1       OBSL1       CUL4B       MOV10     ZDHHC17       LRRK2 
-##    60580.58    59709.00    37377.07   626459.49   107617.60    82083.64 
-##    MAP1LC3A      ELAVL1        CUL3        AGO2       SIRT1       NDEL1 
-##    60281.99  2314491.80   448518.73    47164.04    45481.66    35597.36 
-##       CDC37       CAND1     TERF2IP       CEP70       LZTS2       HECW2 
-##    44029.74   131201.80    39848.25    36763.24    53404.78    87214.38 
-##       SIRT7       FBXO6      VKORC1       CCDC8       SYNE4    NOTCH2NL 
-##   100182.60   270787.34    60764.98    86596.46    38790.80    98847.91 
-## 
-## $bottlenecks.ap
-##        LYN      SMAD2      SMAD3      EP300     PIK3R1      UBE2I     TFAP2A 
-##   53723.06   70690.48   98159.89  112240.73   47949.07   62743.52   61229.15 
-##      PSMA3        SRC      EWSR1     PPP1CA       RPA2      YWHAQ       GRB2 
-##   59206.77   55156.71   49721.95  114395.49   52089.67   87572.71  338737.68 
-##        MYC       TP53        VHL        FYN       SKP1      IKBKG      YWHAE 
-##  404732.80  340569.02   94376.18   47131.13   37765.00   82494.42   64950.92 
-##    SH3KBP1     CREBBP      ATXN1      TERF1        VCP     HNRNPD      HDAC1 
-##   50372.72   64890.21  122302.91   36168.66  120404.71   46668.01  121862.61 
-##      YWHAZ      YWHAB        SFN      BRCA1     TFAP2C     TRIM28      TRAF2 
-##  166609.44  117281.52   51392.30  168515.73   72922.26   36242.06  111935.95 
-##      SUMO1       TCF4      HSPB1      TRAF6     GOLGA2      CDC5L       PIN1 
-##  502057.90   70534.07  102832.96   81041.89   81750.83  121356.64   41085.44 
-##      SUMO2      HDAC2      NEDD8      GSK3B      HSPA8       CBX5      YWHAG 
-##  845609.89   58064.09  166724.29   89347.23   41827.25   72266.49   75683.53 
-##    CSNK2A1   HSP90AB1     CSNK2B       CUL7   CALCOCO2       RNF2     TRIM27 
-##   65946.22  142586.61   77861.51   75002.63   40086.18  174991.54   71004.16 
-##        EED     PPP1CC     CDKN1A       CDK2       MCM7       ESR1        HTT 
-##   58844.25  104585.29   42583.95   87319.36   49434.32  134591.34   84692.22 
-##       ILF3        FUS       KAT5       BMI1       LIG4      XRCC6       SGTA 
-##   42199.65   50470.22   40385.61   54287.54   44213.18   68025.12   68896.41 
-##       SPP1       RPA1        TK1       PEX5     SQSTM1       SNW1       BAG3 
-##   45755.29   52112.45   54003.79   71280.76   38751.75  100900.38  232402.27 
-##     UBQLN1    GABARAP      COPS6      KDM1A        FOS     PAXIP1       AKT1 
-##   82014.80   61973.28   55120.90   90879.36   48532.59   75572.74   50563.21 
-##       CUL1       CUL2      HUWE1       ICT1      PTBP3        PKM      MAPK6 
-##  115015.59   54680.47   49342.89   59642.09   71968.87   50186.90   45561.80 
-##      IQCB1      SRPK1      SHMT2       BAG6      OBSL1      MOV10    ZDHHC17 
-##   39208.97   95901.02  131051.50   43114.51   59709.00  626459.49  107617.60 
-##     ELAVL1       CUL3       AGO2      CAND1    TERF2IP      LZTS2      SIRT7 
-## 2314491.80  448518.73   47164.04  131201.80   39848.25   53404.78  100182.60 
-##      FBXO6     VKORC1   NOTCH2NL 
-##  270787.34   60764.98   98847.91
-
-
-

Heterogeneity of networks

-

NetVA offers netva function to perform -vulnerability analysis of any given network, e.g., a protein-protein -interaction network:

-
#Calculate the value of heterogeneity of a network:
-net.het <- heterogeneity(bc.net)
-
-
-

Cohesiveness and compactness of networks

-

NetVA offers functionality to calculate Cohesiveness and -Compactness of any given network, e.g., a protein-protein interaction -network:

-
#Cohesiveness of complete network:
-#coh.cent <- cohesiveness(net = bc.net)
-
-#Cohesiveness of a network after removal of a particular node, e.g., "UBC":
-#coh.cent <- cohesiveness(v = "UBC", net = bc.net)
-
#Compactness of complete network:
-#com.cent <- compactness(net = bc.net)
-
-#Compactness of a network after removal of a particular node, e.g., "UBC":
-#com.cent <- compactness(v = "UBC", net = bc.net)
-
-
-

Where to go next

-

This tutorial is a brief introduction to NetVA. We -sincerely hope you enjoyed reading it and that it will be useful for -your own network analyses.

-

For a detailed description of specific functions, see corresponding -help documentation using help function and https://github.com/kr-swapnil/NetVA. To report a bug, -open a Github -issue. Please do not ask usage questions on Github directly.

-
-
-

Session info

-

For the sake of reproducibility, the session information for the code -above is the following:

-
sessionInfo()
-
## R version 3.6.3 (2020-02-29)
-## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Ubuntu 20.04.6 LTS
-## 
-## Matrix products: default
-## BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libmkl_rt.so
-## 
-## locale:
-##  [1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C              
-##  [3] LC_TIME=en_IN.UTF-8        LC_COLLATE=en_IN.UTF-8    
-##  [5] LC_MONETARY=en_IN.UTF-8    LC_MESSAGES=en_IN.UTF-8   
-##  [7] LC_PAPER=en_IN.UTF-8       LC_NAME=C                 
-##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
-## [11] LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       
-## 
-## attached base packages:
-## [1] stats     graphics  grDevices utils     datasets  methods   base     
-## 
-## other attached packages:
-## [1] NetVA_1.0.0    igraph_1.5.0.1
-## 
-## loaded via a namespace (and not attached):
-##  [1] digest_0.6.27     R6_2.5.0          jsonlite_1.7.2    magrittr_2.0.1   
-##  [5] evaluate_0.14     stringi_1.5.3     cachem_1.0.4      rlang_1.1.1      
-##  [9] cli_3.6.1         rstudioapi_0.13   jquerylib_0.1.4   bslib_0.5.0      
-## [13] rmarkdown_2.11    tools_3.6.3       stringr_1.4.0     xfun_0.21        
-## [17] yaml_2.2.1        fastmap_1.1.0     compiler_3.6.3    pkgconfig_2.0.3  
-## [21] htmltools_0.5.6.1 knitr_1.31        sass_0.4.7
-
-
-
-
    -
  1. Department of Biotechnology & Bioinformatics, -University of Hyderabad, India.↩︎

  2. -
-
- - - - - - - - - - - diff --git a/vignettes/NetVA.tex b/vignettes/NetVA.tex deleted file mode 100644 index 64c18b4..0000000 --- a/vignettes/NetVA.tex +++ /dev/null @@ -1,273 +0,0 @@ -% Options for packages loaded elsewhere -\PassOptionsToPackage{unicode}{hyperref} -\PassOptionsToPackage{hyphens}{url} -% -\documentclass[ -]{article} -\usepackage{amsmath,amssymb} -\usepackage{iftex} -\ifPDFTeX - \usepackage[T1]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provide euro and other symbols -\else % if luatex or xetex - \usepackage{unicode-math} % this also loads fontspec - \defaultfontfeatures{Scale=MatchLowercase} - \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} -\fi -\usepackage{lmodern} -\ifPDFTeX\else - % xetex/luatex font selection -\fi -% Use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -\IfFileExists{microtype.sty}{% use microtype if available - \usepackage[]{microtype} - \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -\makeatletter -\@ifundefined{KOMAClassName}{% if non-KOMA class - \IfFileExists{parskip.sty}{% - \usepackage{parskip} - }{% else - \setlength{\parindent}{0pt} - \setlength{\parskip}{6pt plus 2pt minus 1pt}} -}{% if KOMA class - \KOMAoptions{parskip=half}} -\makeatother -\usepackage{xcolor} -\usepackage[margin=1in]{geometry} -\usepackage{color} -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\usepackage{framed} -\definecolor{shadecolor}{RGB}{248,248,248} -\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}} -\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}} -\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}} -\newcommand{\BuiltInTok}[1]{#1} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}} -\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}} -\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} -\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}} -\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}} -\newcommand{\ExtensionTok}[1]{#1} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}} -\newcommand{\ImportTok}[1]{#1} -\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}} -\newcommand{\NormalTok}[1]{#1} -\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} -\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}} -\newcommand{\RegionMarkerTok}[1]{#1} -\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}} -\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} -\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} -\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} -\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}} -\usepackage{longtable,booktabs,array} -\usepackage{calc} % for calculating minipage widths -% Correct order of tables after \paragraph or \subparagraph -\usepackage{etoolbox} -\makeatletter -\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} -\makeatother -% Allow footnotes in longtable head/foot -\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} -\makesavenoteenv{longtable} -\usepackage{graphicx} -\makeatletter -\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} -\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} -\makeatother -% Scale images if necessary, so that they will not overflow the page -% margins by default, and it is still possible to overwrite the defaults -% using explicit options in \includegraphics[width, height, ...]{} -\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} -% Set default figure placement to htbp -\makeatletter -\def\fps@figure{htbp} -\makeatother -\setlength{\emergencystretch}{3em} % prevent overfull lines -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -\ifLuaTeX - \usepackage{selnolig} % disable illegal ligatures -\fi -\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} -\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available -\urlstyle{same} -\hypersetup{ - pdftitle={NetVA: an R package for network vulnerability and influence analysis}, - pdfauthor={Swapnil Kumar}, - hidelinks, - pdfcreator={LaTeX via pandoc}} - -\title{NetVA: an R package for network vulnerability and influence -analysis} -\author{Swapnil Kumar} -\date{2023-10-23} - -\begin{document} -\maketitle - -Vignettes are long form documentation commonly included in packages. -Because they are part of the distribution of the package, they need to -be as compact as possible. The \texttt{html\_vignette} output type -provides a custom style sheet (and tweaks some options) to ensure that -the resulting html is as small as possible. The \texttt{html\_vignette} -format: - -\begin{itemize} -\tightlist -\item - Never uses retina figures -\item - Has a smaller default figure size -\item - Uses a custom CSS stylesheet instead of the default Twitter Bootstrap - style -\end{itemize} - -\hypertarget{vignette-info}{% -\subsection{Vignette Info}\label{vignette-info}} - -Note the various macros within the \texttt{vignette} section of the -metadata block above. These are required in order to instruct R how to -build the vignette. Note that you should change the \texttt{title} field -and the \texttt{\textbackslash{}VignetteIndexEntry} to match the title -of your vignette. - -\hypertarget{styles}{% -\subsection{Styles}\label{styles}} - -The \texttt{html\_vignette} template includes a basic CSS theme. To -override this theme you can specify your own CSS in the document -metadata as follows: - -\begin{verbatim} -output: - rmarkdown::html_vignette: - css: mystyles.css -\end{verbatim} - -\hypertarget{figures}{% -\subsection{Figures}\label{figures}} - -The figure sizes have been customised so that you can easily put two -images side-by-side. - -\begin{Shaded} -\begin{Highlighting}[] -\FunctionTok{plot}\NormalTok{(}\DecValTok{1}\SpecialCharTok{:}\DecValTok{10}\NormalTok{)} -\FunctionTok{plot}\NormalTok{(}\DecValTok{10}\SpecialCharTok{:}\DecValTok{1}\NormalTok{)} -\end{Highlighting} -\end{Shaded} - -\includegraphics{Vignette_files/figure-latex/unnamed-chunk-1-1.pdf} -\includegraphics{Vignette_files/figure-latex/unnamed-chunk-1-2.pdf} - -You can enable figure captions by \texttt{fig\_caption:\ yes} in YAML: - -\begin{verbatim} -output: - rmarkdown::html_vignette: - fig_caption: yes -\end{verbatim} - -Then you can use the chunk option -\texttt{fig.cap\ =\ "Your\ figure\ caption."} in \textbf{knitr}. - -\hypertarget{more-examples}{% -\subsection{More Examples}\label{more-examples}} - -You can write math expressions, e.g.~\(Y = X\beta + \epsilon\), -footnotes\footnote{A footnote here.}, and tables, e.g.~using -\texttt{knitr::kable()}. - -\begin{longtable}[]{@{} - >{\raggedright\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.2571}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0714}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0571}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0857}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0571}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0714}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0857}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0857}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0429}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0429}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0714}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0714}}@{}} -\toprule\noalign{} -\begin{minipage}[b]{\linewidth}\raggedright -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -mpg -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -cyl -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -disp -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -hp -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -drat -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -wt -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -qsec -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -vs -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -am -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -gear -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedleft -carb -\end{minipage} \\ -\midrule\noalign{} -\endhead -\bottomrule\noalign{} -\endlastfoot -Mazda RX4 & 21.0 & 6 & 160.0 & 110 & 3.90 & 2.620 & 16.46 & 0 & 1 & 4 & -4 \\ -Mazda RX4 Wag & 21.0 & 6 & 160.0 & 110 & 3.90 & 2.875 & 17.02 & 0 & 1 & -4 & 4 \\ -Datsun 710 & 22.8 & 4 & 108.0 & 93 & 3.85 & 2.320 & 18.61 & 1 & 1 & 4 & -1 \\ -Hornet 4 Drive & 21.4 & 6 & 258.0 & 110 & 3.08 & 3.215 & 19.44 & 1 & 0 & -3 & 1 \\ -Hornet Sportabout & 18.7 & 8 & 360.0 & 175 & 3.15 & 3.440 & 17.02 & 0 & -0 & 3 & 2 \\ -Valiant & 18.1 & 6 & 225.0 & 105 & 2.76 & 3.460 & 20.22 & 1 & 0 & 3 & -1 \\ -Duster 360 & 14.3 & 8 & 360.0 & 245 & 3.21 & 3.570 & 15.84 & 0 & 0 & 3 & -4 \\ -Merc 240D & 24.4 & 4 & 146.7 & 62 & 3.69 & 3.190 & 20.00 & 1 & 0 & 4 & -2 \\ -Merc 230 & 22.8 & 4 & 140.8 & 95 & 3.92 & 3.150 & 22.90 & 1 & 0 & 4 & -2 \\ -Merc 280 & 19.2 & 6 & 167.6 & 123 & 3.92 & 3.440 & 18.30 & 1 & 0 & 4 & -4 \\ -\end{longtable} - -Also a quote using \texttt{\textgreater{}}: - -\begin{quote} -``He who gives up {[}code{]} safety for {[}code{]} speed deserves -neither.'' -(\href{https://twitter.com/hadleywickham/status/504368538874703872}{via}) -\end{quote} - -\end{document}