plotHistogram: Histogram of binned read counts with fitted mixture...

Description Usage Arguments Value See Also Examples

View source: R/plotting.R

Description

Plot a histogram of binned read counts with fitted mixture distributions from a uniHMM object.

Usage

1
2
3
4
5
6
7
8
plotHistogram(
  model,
  state = NULL,
  chromosomes = NULL,
  start = NULL,
  end = NULL,
  linewidth = 1
)

Arguments

model

A uniHMM object or file that contains such an object.

state

Plot the histogram only for the specified state. One of c('unmodified','modified').

chromosomes, start, end

Plot the histogram only for the specified chromosomes, start and end position.

linewidth

Width of the distribution lines.

Value

A ggplot object.

See Also

plotting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Get an example BAM file with ChIP-seq reads
file <- system.file("extdata", "euratrans",
                      "lv-H3K27me3-BN-male-bio2-tech1.bam",
                       package="chromstaRData")
## Bin the BED file into bin size 1000bp
data(rn4_chrominfo)
data(experiment_table)
binned <- binReads(file, experiment.table=experiment_table,
                  assembly=rn4_chrominfo, binsizes=1000,
                  stepsizes=500, chromosomes='chr12')
plotHistogram(binned)
## Fit the univariate Hidden Markov Model
hmm <- callPeaksUnivariate(binned, max.time=60, eps=1)
## Check if the fit is ok
plotHistogram(hmm)

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