library(knitr) library(here) library(BED) library(dplyr) cranRef <- function(x){ sprintf( "[%s](https://CRAN.R-project.org/package=%s): %s", x, x, packageDescription(x)$Title ) }
r packageDescription("BED")$Description
install.packages("BED")
The following R packages available on CRAN are required:
deps <- desc::desc_get_deps() sdeps <- filter(deps, type %in% c("Depends", "Imports") & package!="R") for(p in sdeps$package){ cat(paste("-", cranRef(p)), sep="\n") }
And those are suggested:
wdeps <- filter(deps, type=="Suggests" & package!="R") for(p in wdeps$package){ cat(paste("-", cranRef(p)), sep="\n") }
devtools::install_github("patzaw/BED")
If you get an error like the following...
Error: package or namespace load failed for ‘BED’: .onLoad failed in loadNamespace() for 'BED', details: call: connections[[connection]][["cache"]] error: subscript out of bounds
... remove the BED folder located here:
file.exists(file.path(Sys.getenv("HOME"), "R", "BED"))
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()
This package and the underlying research has been published in this peer reviewed article:
" target="_blank">
r sub('[[]', '(', sub('[]]', ')', format(citation("BED"), style="textVersion")))
An instance of the BED database (UCB-Human) has been built using the script provided in the BED R package.
This instance is focused on Homo sapiens, Mus musculus, Rattus norvegicus, Sus scrofa and Danio rerio organisms. It has been built from the following resources:
config <- jsonlite::read_json( here("supp/Build/Genodesy-instance/deploy_config.json") ) zr <- config$ZENODO_RECORD
The Neo4j graph database is available as a dump file shared in Zenodo.
The following shell commands can be adapted according to user needs and called to get a running Neo4j container with a BED database instance.
ec <- readLines(here("supp/Build/S21-Deploy-from-Zenodo.sh")) torm <- grep("^### usage: ", ec, value=FALSE) stopifnot(length(torm) == 1) torm <- c(torm, torm+1) clines <- grep("## Config ----", ec) stopifnot(length(clines) == 1) clines <- seq( clines, grep("#+@", ec)[which(grep("#+@", ec) > clines)][1], by = 1 ) torm <- c(torm, clines) ec <- ec[-torm] for(n in names(config)){ ec <- gsub(paste0("[$][{]?", n, "[}]?"), config[[n]], ec) } ec <- gsub("___ROOT___", "~", ec) ## cat('```sh', sep="\n") cat(ec, sep="\n") cat('```', sep="\n")
Building and feeding a BED database instance is achieved using scripts available in the "supp/Build" folder.
Using the S01-NewBED-Container.sh script.
Using the S02-Rebuild-BED.sh script which compile the Rebuild-BED.Rmd document.
Using the S03-Dump-BED.sh script
Sergio Espeso-Gil has reported stability issues with Docker images in Windows. It's mainly solved by checking the "Use the WSL2 based engine" options in docker settings. More information is provided here: https://docs.docker.com/docker-for-windows/wsl/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.