plotPeaks: Create a plot of ChIP read counts with called peaks and...

Description Usage Arguments Value Author(s) References Examples

View source: R/plotpeaks.R

Description

'plotPeaks()' imports the output from 'ZIMHMM()' or 'ZIHMM()' and plot the peak calls of a given genomic region.

Usage

1
plotPeaks(output, chr, ranges, data, peaks = NULL)

Arguments

output

Either an output from 'ZIMHMM()' or 'ZIHMM()'

chr

A string with the chromosome name to be displayed (such as 'chr19')

ranges

A vector with two elements that specifies the genomic windows to be plotted.

data

A RangedSummarizedExperiment object with the same assay (with the 'ChIP' counts) used in 'ZIMHMM()'

peaks

An optional vector of length M with zeros (background) and ones (peaks) representing the enriched windows. If not provided, 'plotPeaks()' will use the Viterbi sequence from 'output'.

Value

A ggplot

Author(s)

Pedro L. Baldoni, pedrobaldoni@gmail.com

References

https://github.com/plbaldoni/ZIMHMM

Examples

1
2
3
4
5
6
data(Huvec)
ChIP = SummarizedExperiment::assay(Huvec,'ChIP')
Control = log(SummarizedExperiment::assay(Huvec,'Control')+1)
offset = matrix(log(colSums(ChIP)),nrow = nrow(ChIP),ncol = ncol(ChIP),byrow = TRUE)
## Not run: output = ZIHMM(ChIP = ChIP,Control = Control,offset = offset,control = controlPeaks(epsilon.em = 1e-3,criterion = 'MRCPE'))
## Not run: plotPeaks(output = output,chr = 'chr19',ranges = c(16898093,17040483),data = Huvec)

plbaldoni/ZIMHMM documentation built on Dec. 5, 2019, 11:43 p.m.