plot.bed: Plot bed file.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/visuals.R

Description

Plot the distribution of reads in a .bed file.

Usage

1
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.

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.

Value

Plots a histogram on the active graphical device.

Author(s)

Jonathan Cairns

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

1
2
3
4
5
6
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)

BayesPeak documentation built on April 28, 2020, 6:27 p.m.