knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
JBrowseR is an R package that provides a simple and clean interface to JBrowse 2 for R users. Using JBrowseR, you can:
You can install the released version of JBrowseR from CRAN with:
install.packages("JBrowseR")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("gmod/JBrowseR")
This line of code can be used to launch a genome browser from your R console:
library(JBrowseR) JBrowseR("ViewHg19", location = "10:29,838,737..29,838,819")
In order to get started with JBrowseR, please refer to the vignette that best suits your needs:
Allows you to search by gene name
https://gmod.shinyapps.io/basic_usage_with_text_index
Shows a "bookmark" type feature, loading data from data frame, and buttons to navigate to genes of interest
https://gmod.shinyapps.io/bookmarks_demo
Shows loading a config.json file
https://gmod.shinyapps.io/load_config_json
Simple example showing a data frame as a track
https://gmod.shinyapps.io/load_data_frame
Shows putative gene fusions in the SKBR3 breast cancer cell line
https://gmod.shinyapps.io/skbr3_gene_fusions
If you use JBrowseR in your research, please cite the following publication:
Hershberg et al., 2021. JBrowseR: An R Interface to the JBrowse 2 Genome Browser
@article{hershberg2021jbrowser, title={JBrowseR: An R Interface to the JBrowse 2 Genome Browser}, author={Hershberg, Elliot A and Stevens, Garrett and Diesh, Colin and Xie, Peter and De Jesus Martinez, Teresa and Buels, Robert and Stein, Lincoln and Holmes, Ian}, journal={Bioinformatics} }
To modify the codebase, you can set up a dev environment as follows
git clone https://github.com/GMOD/JBrowseR cd JBrowseR yarn yarn build # build current webpack dependencies R install.packages('devtools') devtools::install() library(JBrowseR) JBrowseR("ViewHg19", location = "10:29,838,737..29,838,819") # this will now use your local build of JBrowseR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.