-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathepivizr.Rmd
More file actions
62 lines (41 loc) · 2.05 KB
/
epivizr.Rmd
File metadata and controls
62 lines (41 loc) · 2.05 KB
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
---
title: "epivizr"
output: html_document
---
```{r setup, include=FALSE}
opts_chunk$set(eval=FALSE)
```
**Purpose**: Interactive visualization of genomic data in a browser. Supports Bioconductor data structures such as `GenomicRanges` and `SummarizedExperiments`.
**Citations**:
* [Chelaru et al. (2014)](http://www.nature.com/nmeth/journal/v11/n9/full/nmeth.3038.html)
To install the `epivizr` R/Bioconductor package
```{r}
source("http://bioconductor.org/biocLite.R")
biocLite("epivizr")
library(epivizr)
```
# `epivizr` Workflow
```{r}
mgr <- startEpiviz() # Opens epiviz in the browser and starts a new session
# Line plot of methylation data at base-pair resolution
mgr$addDevice(GRangesObject, "450kMeth", type="bp", columns = IDs)
# Scatter plot comparing the M-values and A-values in an MA plot
mat # data frame with "Avals" and "Mvals" as column names
assayDataElement(GRangesObject, "MA") <- mat
show(GRangesObject)
mgr$addDevice(GRangesObject, "MAPlot", columns = c("Avals", "Mvals"), assay = "MA")
mgr$stopServer() # closing the epiviz session
```
#### Starting a new epiviz session
* `startEpiviz()` = opens epiviz in the browser and starts a new interactive session between R and the browser
#### Examples
* `mgr$addDevice(GRangesObject, "450kMeth", type="bp", columns = ...)` = Line plot of methylation data at base-pair resolution
* `mgr$addDevice(GRangesObject, "MAPlot", columns = ..., assay = ...)` = Scatter plot (MA plot) using an `MA` data frame that was added using `assayDataElement(GRangesObject, "MA") <- mat` where `mat` has columns `Avals` and `Mvals`.
*
#### Other
* `mgr$rmAllDevices()` = removes all plots added in current session
* `mgr$listDevice()` = list all devices added in current session
* `mgr$navigate(chr = ..., start = ... , end = ...)` = Move to a specific region in the genome defined by `chr`, `start` and `end`
* `mgr$slideshow(regionsObject, n = ...)` = create a slide show of the top n regions
#### Closing an epiviz session
* `mgr$stopServer()` = closes the epiviz interactive session betwee R and the browser