plotStrandedCoverage {RIPSeeker} | R Documentation

## Plot strand-specific read coverage for a GRanges object

### Description

Plot read counts within fixed bin across the entire chromosome.

### Usage

    plotStrandedCoverage(gr, binSize = 1000, plotLegend = FALSE, ylim, ...)

### Arguments

`gr` | `GRanges` object containing the alignments.
`binSize` | Integer indicate the size of the bin used to compute and plot the read counts.
`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.
`ylim` | A two element scale on the y-axis, indicating the maximum read counts on the + and - strand to be plotted (e.g., ylim=c(-200, 200)).
`...` | Extra arguments passed to `plotCoverage`.

### Details

Read count on + and - strand are displayed as red and blue bars on the positive and negative y-axis, respectively. The x-axis indicates the positions across the chromosmoe. The plot can be used to examine for each chromosome the overall alignment properties such as strand specificity (expected in non-strand-specific sequencing) and aggregation of reads.

### 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

`plotCoverage, plot, legend`

### Examples

    # 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

    plotStrandedCoverage(gr=alignGRList$chrX, binSize=binSize,

    		xlab="", ylab="", plotLegend=TRUE, box.lty=0, legend.cex=2 )

[Package RIPSeeker version 1.22.0 Index]