- Introduction
- Installation
- R package in normal use
- Citing BED
- BED database instance available as a docker image
- Build a BED database instance
- Notes about Docker
Introduction
The aim of the BED (Biological Entity Dictionary) R package is to get and explore mapping between identifiers of biological entities (BE). This package provides a way to connect to a BED Neo4j database in which the relationships between the identifiers from different sources are recorded.
Installation
From CRAN
install.packages("BED")
Dependencies
The following R packages available on CRAN are required:
- neo2R: Neo4j to R
- visNetwork: Network Visualization using ‘vis.js’ Library
- dplyr: A Grammar of Data Manipulation
- readr: Read Rectangular Text Data
- stringr: Simple, Consistent Wrappers for Common String Operations
- utils: The R Utils Package
- shiny: Web Application Framework for R
- DT: A Wrapper of the JavaScript Library ‘DataTables’
- miniUI: Shiny UI Widgets for Small Screens
- rstudioapi: Safely Access the RStudio API
And those are suggested:
- knitr: A General-Purpose Package for Dynamic Report Generation in R
- rmarkdown: Dynamic Documents for R
- biomaRt: Interface to BioMart databases (i.e. Ensembl)
- GEOquery: Get data from NCBI Gene Expression Omnibus (GEO)
- base64enc: Tools for base64 encoding
- htmltools: Tools for HTML
- webshot: Take Screenshots of Web Pages
- RCurl: General Network (HTTP/FTP/…) Client Interface for R
Installation from github
devtools::install_github("patzaw/BED")
Possible issue when updating from releases <= 1.3.0
If you get an error like the following…
: package or namespace load failed for ‘BED’:
Errorin loadNamespace() for 'BED', details:
.onLoad failed : connections[[connection]][["cache"]]
call: subscript out of bounds error
… remove the BED folder located here:
file.exists(file.path(Sys.getenv("HOME"), "R", "BED"))
R package in normal use
Documentation is provided in the BED vignette.
A public instance of the BED Neo4j database is provided for convenience and can be reached as follows:
library(BED)
connectToBed("https://genodesy.org/BED/", remember=TRUE, useCache=TRUE)
findBeids()
Citing BED
This package and the underlying research has been published in this peer reviewed article:
BED database instance available as a docker image
An instance of the BED database (UCB-Human) has been built using the script provided in the BED R package and made available in a Docker image available here: https://hub.docker.com/r/patzaw/bed-ucb-human/
This instance is focused on Homo sapiens, Mus musculus, Rattus norvegicus, Sus scrofa and Danio rerio organisms and it has been built from the following resources:
- Ensembl
- NCBI
- Uniprot
- biomaRt
- GEOquery
- Clarivate Analytics MetaBase
The following commands can be adapted according to user needs and called to get a running container with a BED database instance.
export BED_HTTP_PORT=5454
export BED_BOLT_PORT=5687
docker run -d \
--name bed \
--publish=$BED_HTTP_PORT:7474 \
--publish=$BED_BOLT_PORT:7687 \
--env=NEO4J_dbms_memory_heap_initial__size=4G \
--env=NEO4J_dbms_memory_heap_max__size=4G \
--env=NEO4J_dbms_memory_pagecache_size=4G \
--env=NEO4J_dbms_read__only=true \
--env=NEO4J_AUTH=none \
--restart=always \
patzaw/bed-ucb-human
Sergio Espeso-Gil has reported stability issues with this image running on Docker in Windows. It’s mainly solved by checking the “Use the WSL2 based engine” options in docker settings. More information are provided here: https://docs.docker.com/docker-for-windows/wsl/
Build a BED database instance
Building and feeding a BED database instance is achieved using scripts available in the “supp/Build” folder.
Notes about Docker
Saving and loading an image archive
You can save the created image:
docker save bed-ucb-human:$BED_VERSION > docker-bed-ucb-human-$BED_VERSION.tar
And the image archive can be loaded with the following command:
cat docker-bed-ucb-human-$BED_VERSION.tar | docker load