Install and load netZooR package

# install.packages("devtools") 
library(devtools)
# install netZooR pkg with vignettes, otherwise remove the "build_vignettes = TRUE" argument.
devtools::install_github("netZoo/netZooR", build_vignettes = TRUE)
library(netZooR)

This vignettes can be accessed in R by using below line. when netZoooR was installed with arguments "build_vignettes = TRUE".

vignette("ALPACA",package="netZooR")

\section{A simple example with two node groups} We will show how ALPACA can find changes in modular structure between two simulated networks. The networks both have 20 regulator nodes and 80 target nodes. The baseline network consists of two groups that are strongly connected to each other, whereas the perturbed network has weaker connections between the two groups. The two groups consist of nodes {A1-A10,B1-B40} and {A11-A20,B41-B80}. Contrasting the two networks using ALPACA identifies these two groups as being the modules that best characterize the perturbation.

These simulated networks is available in our public AWS S3 bucket. Change the preferred working directory to store the Example_2comm.txt file, otherwise the store directory is current working directory.

system("curl -O  https://netzoo.s3.us-east-2.amazonaws.com/netZooR/tutorial_datasets/Example_2comm.txt")
simp.mat <- read.table("./Example_2comm.txt",header=TRUE) 
simp.alp <- alpaca(simp.mat,NULL,verbose=FALSE)
simp.alp2 <- simp.alp[[1]]
simp.memb <- as.vector(simp.alp2)
names(simp.memb) <- names(simp.alp2)

simp.memb


netZoo/netZooR documentation built on June 8, 2024, 6:20 a.m.