plotGenomeBrowser: #' Plot a genome browser view #' #' Plot a simple genome...

Description Usage Arguments Value Examples

View source: R/plotting.R

Description

Plot a simple genome browser view of chromstaR-objects. This is useful for scripted genome browser snapshots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotGenomeBrowser(
  model,
  chr,
  start,
  end,
  style = "peaks",
  peakHeight = 0.2,
  peakColor = "blue",
  same.yaxis = TRUE
)

Arguments

model

A uniHMM, multiHMM or combinedMultiHMM object or file that contains such an object.

chr, start, end

Chromosome, start and end coordinates for the plot.

style

One of c('peaks', 'density').

peakHeight

Height of the peak track relative to the count track.

peakColor

Color for the peak track.

same.yaxis

Whether or not the plots for the same mark have the same y-axis.

Value

A list() of ggplot objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Get an example uniHMM ##
file <- system.file("data","H3K27me3-BN-rep1.RData", package="chromstaR")
model <- get(load(file))
plotGenomeBrowser(model, chr='chr12', start=1, end=1e6, style='peaks',
                 peakHeight=0.1)
                 
## Get an example multiHMM ##
file <- system.file("data","multivariate_mode-combinatorial_condition-SHR.RData",
                    package="chromstaR")
model <- get(load(file))
plotGenomeBrowser(model, chr='chr12', start=1, end=1e6, style='peaks',
                 peakHeight=0.1)
                 
## Get an example combinedMultiHMM ##
file <- system.file("data","combined_mode-differential.RData",
                    package="chromstaR")
model <- get(load(file))
plotlist <- plotGenomeBrowser(model, chr='chr12', start=1, end=1e6, style='peaks',
                 peakHeight=0.1)

chromstaR documentation built on Nov. 8, 2020, 8:29 p.m.