Learn R Programming

BayesPeak (version 1.24.0)

plot.bed: Plot bed file.

Description

Plot the distribution of reads in a .bed file.

Usage

plot.bed(x, chr, start, end, strand = "+", bin = 50L, ...)

Arguments

x
RangedData (from the IRanges package) with a value column entitled "strand". The .bed file to plot. This could have been read in with read.bed, or alternatively by the import function in the rtracklayer library.
chr
Character. Chromosome to plot - should be exactly the same as a space in bed.
start, end
Integer. Start and end locations on chromosome.
strand
Character. Strand to plot - usually either "+" or "-". If the bed argument uses a different convention in its strand column, this can be used instead.
bin
Integer. The width of bin to plot.
...
Additional arguments, passed to hist.

Value

Plots a histogram on the active graphical device.

Details

This function takes the reads in a bed file, and plots a histogram of their locations. This allows us to see the peaks present in the data.

References

Spyrou C, Stark R, Lynch AG, Tavare S BayesPeak: Bayesian analysis of ChIP-seq data, BMC Bioinformatics 2009, 10:299 doi:10.1186/1471-2105-10-299

See Also

read.bed

Examples

Run this code

dir <- system.file("extdata", package="BayesPeak")
treatment <- file.path(dir, "H3K4me3reduced.bed")
bed <- read.bed(treatment)

##look at region chr16:91000000-94000000
plot.bed(bed, "chr16", 9.1E7, 9.4E7)

Run the code above in your browser using DataLab