knitr::opts_chunk$set(message=FALSE, warning=FALSE, collapse=FALSE, comment="")
options(width=600)
devtools::load_all()

# For examples
library(ndexr)

bieulergy

build Gitter GitHub issues GitHub last commit

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.

Documentation

Please visit the documentation for a comprehensive overview.

Gitter

Feel free to bring your questions, comments, or feedback to our gitter channel.

Installation

We recommend the latest version of R (>= 4.0.0) and installation directly from Github.

devtools::install_github("montilab/bieulergy")

Usage

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)

Interactive Omics Network Object

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)

Multiple Network Objects

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)

Web Interface

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.



montilab/bieulergy documentation built on March 25, 2022, 3:40 p.m.