knitr::opts_chunk$set(message=FALSE, warning=FALSE, collapse=FALSE, comment="") options(width=600) devtools::load_all() # For examples library(ndexr)
The goal of bieulergy is to facilitate interactive network biology in R, specifically the analysis, visualization, and comparison of biological regulatory networks. This includes building out R command-line functions geared towards biological networks as well as interactive analysis through R Shiny.
Please visit the documentation for a comprehensive overview.
Feel free to bring your questions, comments, or feedback to our gitter channel.
We recommend the latest version of R (>= 4.0.0) and installation directly from Github.
devtools::install_github("montilab/bieulergy")
Networks are represented as interactive.omics.network
objects with node/edge-level properties for mapping gene/protein symbols, centrality measures, and integrating multi-omics data layers into your analysis. These are R6 objects that extend omics.network
objects to facilitate interactive analyses. You can find more information about omics.network
objects here.
library(bieulergy)
library(ndexr)
ndex <- function(uuid) { ndexcon <- ndexr::ndex_connect() data <- ndexr::ndex_get_network(ndexcon, uuid) mat <- as.matrix(data$edges) storage.mode(mat) <- "character" ig <- igraph::graph_from_edgelist(mat[,c("s", "t")], directed=FALSE) ids <- data$nodes[match(as.numeric(igraph::as_ids(V(ig))), data$nodes[,"@id"]), "n"] V(ig)$label <- ids return(ig) }
# Global landscape of HIV–human protein complexes. # Jaeger et al. Nature. 2011 Dec 21; 481(7381): 365–370 # @UUID: 1cbe89ab-fb5d-11e9-bb65-0ac135e8bacf # https://www.ndexbio.org/viewer/networks/1cbe89ab-fb5d-11e9-bb65-0ac135e8bacf ig <- ndex("1cbe89ab-fb5d-11e9-bb65-0ac135e8bacf") ionet <- bieulergy::create.ionet(ig, type="ig")
str(ionet$properties)
head(ionet$nodes)
Graph and node properties are pre-computed for fast interactive rendering and analysis.
head(ionet$pca$var$contrib)
Many of the downstream functions expect one or more interactive.omics.network
objects for comparative analyses.
# Simulated networks from yeast data by Kristina Hanspers # @UUID: 7831a991-5767-11ea-bfdc-0ac135e8bacf # https://www.ndexbio.org/viewer/networks/7831a991-5767-11ea-bfdc-0ac135e8bacf yeast.networks <- readRDS(file.path(system.file("extdata", package="bieulergy"), "yeast-networks.rds"))
is(yeast.networks, "list") sapply(yeast.networks, is)
yeast.1 <- yeast.networks$Yeast_1 head(yeast.1$nodes)
Here is an example of plotting the top nodes by degree centrality across networks.
bieulergy::networks.tnodes(networks=yeast.networks, metric="degree", symbols=TRUE, size=5, top=10)
Bieulergy is an R package and a Shiny application. Some functionality is exclusive to one or the other but there is a lot of overlap. The Shiny application is ideal for rapid analysis and comparison while the command line is more suitable for advanced custom analyses.
bieulergy::run.shiny()
Or run with Docker...
git clone https://github.com/montilab/bieulergy
cd bieulergy
docker build --tag montilab/bieulergy:latest .
Launch the package within a Docker environment..
docker run -d -p 8787:8787 -e PASSWORD=bieulergy montilab/bieulergy:latest
Run the Shiny application. Go to http://localhost:8787 in the browser and you will be promted:
username: rstudio
password: bieulergy
Then enter the following:
library(bieulergy) bieulergy::run.shiny()
Please refer to the documentation for more examples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.