Learn R Programming

transcriptR (version 1.0.2)

plotErrorRate: plotErrorRate

Description

A simple helper function that plot results of estimateGapDistance function call.

Usage

plotErrorRate(object, color = c("#1B9E77", "#D95F02", "#7570B3"),
  xlab = "Gap distance (kb)", ylab = "Error rate", ...)

## S3 method for class 'TranscriptionDataSet': plotErrorRate(object, color = c("#1B9E77", "#D95F02", "#7570B3"), xlab = "Gap distance (kb)", ylab = "Error rate", ...)

Arguments

object
color
Character. Colors to be used to plot estimated errors.
xlab
Character. Label of the x-axis.
ylab
Character. Lable of the y-axis.
...
Further arguments passed to plot.

Value

  • plot

Details

The tested gap distances are plotted on the x-axis and corresponding error rates on the y-axis. Three curved lines depict the two error types calculated by estimateGapDistance and the sum of both errors. The vertical dashed line depicts the gap distance with the smallest sum of two errors.

See Also

estimateGapDistance

Examples

Run this code
### Load TranscriptionDataSet object
data(tds)

### Load reference annotations (knownGene from UCSC)
data(annot)

### Estimate gap distance minimazing error rate
### Define the range of gap distances to test
gdr <- seq(from = 0, to = 10000, by = 1000)

estimateGapDistance(object = tds, annot = annot, coverage.cutoff = 5,
filter.annot = FALSE, gap.dist.range = gdr)

plotErrorRate(object = tds, lwd = 2)

Run the code above in your browser using DataLab