-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
129 lines (84 loc) · 3.53 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# JBrowseR <img src='man/figures/logo.png' align="right" height="136" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/GMOD/JBrowseR/workflows/R-CMD-check/badge.svg)](https://github.com/gmod/JBrowseR/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/JBrowseR)](https://CRAN.R-project.org/package=JBrowseR)
<!-- badges: end -->
JBrowseR is an R package that provides a simple and clean interface to [JBrowse 2](https://jbrowse.org/jb2/) for R users.
Using JBrowseR, you can:
- Embed the JBrowse 2 genome browser in **R Markdown** documents and **Shiny applications**
- Deploy a genome browser directly from the R console to view your data
- Customize your genome browser to display your own data
## Installation
You can install the released version of JBrowseR from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("JBrowseR")
```
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("gmod/JBrowseR")
```
## Example
This line of code can be used to launch a genome browser from your R console:
```{r example, eval=FALSE}
library(JBrowseR)
JBrowseR("ViewHg19", location = "10:29,838,737..29,838,819")
```
<img src="man/figures/README-example-1.png" width="100%" />
## Getting started
In order to get started with JBrowseR, please refer to the vignette that best suits your needs:
- [Introduction](https://gmod.github.io/JBrowseR/articles/JBrowseR.html)
- [Custom browser tutorial](https://gmod.github.io/JBrowseR/articles/custom-browser-tutorial.html)
- [JSON configuration tutorial](https://gmod.github.io/JBrowseR/articles/json-tutorial.html)
- [Creating URLS](https://gmod.github.io/JBrowseR/articles/creating-urls.html)
## Live demos
### Basic usage including text search index
Allows you to search by gene name
https://gmod.shinyapps.io/basic_usage_with_text_index
### Multi purpose demo app
Shows a "bookmark" type feature, loading data from data frame, and buttons to navigate to genes of interest
https://gmod.shinyapps.io/bookmarks_demo
### Load config.json file
Shows loading a config.json file
https://gmod.shinyapps.io/load_config_json
### Load data frame
Simple example showing a data frame as a track
https://gmod.shinyapps.io/load_data_frame
### Gene fusion example
Shows putative gene fusions in the SKBR3 breast cancer cell line
https://gmod.shinyapps.io/skbr3_gene_fusions
## Citation
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](https://doi.org/10.1093/bioinformatics/btab459)
```
@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}
}
```
## For developers
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
```