In this document we setup the starting workspace for the workshop to run locally using the epivizrChart package and the Rstudio viewer pane, to make it easier to work with.

The goal is to add a genes track for hg19, a track with CpG islands, and a heatmap with expression from the gene expression barcode project.

Let’s start the application with hg19 as the reference for genes track.

lets first load the libraries

library(epivizrChart)
## No methods found in "RSQLite" for requests: dbGetQuery
library(Homo.sapiens)
## Loading required package: AnnotationDbi
## Loading required package: stats4
## Loading required package: BiocGenerics
## Loading required package: parallel
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
## 
##     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
##     clusterExport, clusterMap, parApply, parCapply, parLapply,
##     parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
##     as.data.frame, cbind, colMeans, colSums, colnames, do.call,
##     duplicated, eval, evalq, get, grep, grepl, intersect,
##     is.unsorted, lapply, lengths, mapply, match, mget, order,
##     paste, pmax, pmax.int, pmin, pmin.int, rank, rbind, rowMeans,
##     rowSums, rownames, sapply, setdiff, sort, table, tapply,
##     union, unique, unsplit, which, which.max, which.min
## Loading required package: Biobase
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: IRanges
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:base':
## 
##     expand.grid
## Loading required package: OrganismDbi
## Loading required package: GenomicFeatures
## Loading required package: GenomeInfoDb
## Loading required package: GenomicRanges
## Loading required package: GO.db
## 
## Loading required package: org.Hs.eg.db
## 
## Loading required package: TxDb.Hsapiens.UCSC.hg19.knownGene
library(epivizWorkshop)

We have a new element called environment. epiviz-environment enables brushing across all the charts in the current workspace and manages data. The environment also lets you set a genomic location to all its children charts. This will be more clear at the end of this vignette.

First, Create an epiviz enivornment

epivizEnv <- epivizEnv(chr="chr11", start= 34000000, end = 39000000)

Lets add the hg19 reference genes track

genes_track <- epivizChart(Homo.sapiens, parent=epivizEnv)
## creating gene annotation (it may take a bit)
## 'select()' returned 1:1 mapping between keys and columns
genes_track

Now, let’s add the CpG island track included in this package.

data(cgi_gr)
cgi_track <- epivizChart(cgi_gr, parent=epivizEnv, datasource_name="CpG Islands")
cgi_track

Now, let’s add a heatmap with the gene expression barcode data

data(bcode_eset)
bcode_hmap <- epivizChart(bcode_eset, parent=epivizEnv, datasource_name="Gene Expression Barcode", chart="HeatmapPlot")
## Loading required package: hgu133plus2.db
## 
## 'select()' returned 1:many mapping between keys and columns
bcode_hmap

Finally lets visualize all the charts in the environment.

epivizEnv