plotErrorRate

Share:

Description

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

Usage

1
2
3
4
5
6
7
plotErrorRate(object, color = c("#1B9E77", "#D95F02", "#7570B3"),
  xlab = "Gap distance (kb)", ylab = "Error rate", ...)

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

Arguments

object

A TranscriptionDataSet 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.

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.

Value

plot

Author(s)

Armen R. Karapetyan

See Also

estimateGapDistance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### 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)