plotCoverage: Plot read coverage for a GRanges object

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

Description

An internal function used by plotStrandedCoverage to plot read counts within each fixed bin across the entire chromosome.

Usage

1
plotCoverage(x, plotLegend = FALSE, legend.cex = 1, ...)

Arguments

x

GRanges object with values slot saved for read counts within the corresponding ranges.

plotLegend

Binary indcator. If TRUE, legend will be plotted on the top left the plot. Legend is expected to be the chromsome name and length, which must be available in the GRange object argument.

legend.cex

Font size of the legend.

...

Extra arguments passed to either the plot or the legend.

Details

The read counts is plotted in blue bars as positive integer across the x-axis as the sorted positions across the chromosome. The plot can be used to examine the overall alignment properties for each chromosome.

Note

Users are not recommanded run this function directly but rather via a much more user friendly function plotStrandedCoverage.

Author(s)

Yue Li

References

P. Aboyoun, H. Pages and M. Lawrence (). GenomicRanges: Representation and manipulation of genomic intervals. R package version 1.8.9.

See Also

plotStrandedCoverage, plot, legend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Retrieve system files
extdata.dir <- system.file("extdata", package="RIPSeeker") 

bamFiles <- list.files(extdata.dir, ".bam$", recursive=TRUE, full.names=TRUE)

bamFiles <- grep("PRC2", bamFiles, value=TRUE)

alignGal <- getAlignGal(bamFiles[1], reverseComplement=TRUE, genomeBuild="mm9")

alignGR <- as(alignGal, "GRanges")

alignGRList <- GRangesList(as.list(split(alignGR, seqnames(alignGR))))

binSize <- 1000

binGR <- binCount(alignGRList$chrX, binSize)

plotCoverage(binGR, plotLegend=TRUE)

gorillayue/RIPSeeker documentation built on May 17, 2019, 7:59 a.m.