makePlot.overlap {QoRTs}R Documentation

Overlap Mismatch Rates

Description

For paired-end data only, plots the rate at which the two reads have point-mismatch on overlapping regions.

Usage

  makePlot.overlap.coverage(plotter,
                            plot.rates = TRUE, 
                            singleEndMode,
                            rasterize.plotting.area = FALSE, 
                            raster.height = 1000, 
                            raster.width = 1000,
                            debugMode,
                            r2.buffer=NULL,
                            plot = TRUE,
                            ...)

  makePlot.overlapMismatch.size(plotter,
                                plot.rates = TRUE,
                                log.y = TRUE,
                                noIndel = TRUE,
                                draw.decade.lines = c(TRUE,TRUE),
                                xlim = NULL,
                                pct.cutoff=0.95,
                                singleEndMode,
                                debugMode,
                                rasterize.plotting.area = FALSE, 
                                raster.height = 1000, 
                                raster.width = 1000,
                                plot = TRUE,
                                ...)
                                
  makePlot.overlapMismatch.byCycle(plotter,
                                   plot.rates = TRUE, 
                                   noIndel = TRUE, 
                                   log.y = TRUE,
                                   singleEndMode = plotter$res@singleEnd,
                                   rasterize.plotting.area = FALSE, 
                                   raster.height = 1000, 
                                   raster.width = 1000,
                                   debugMode,
                                   r2.buffer,
                                   plot = TRUE,
                                   ...)
  
  makePlot.overlapMismatch.byQual.min(plotter,
                                      plot.rates = TRUE,
                                      log.y = TRUE,
                                      noIndel = TRUE,
                                      draw.decade.lines = TRUE,
                                      singleEndMode,
                                      debugMode,
                                      rasterize.plotting.area = FALSE, 
                                      raster.height = 1000, 
                                      raster.width = 1000,
                                      plot = TRUE,
                                      ...)

  makePlot.overlapMismatch.byQual.read(plotter,
                                       plot.rates = TRUE,
                                       noIndel = TRUE,
                                       log.y = TRUE,
                                       draw.decade.lines = TRUE,
                                       singleEndMode,
                                       debugMode,
                                       rasterize.plotting.area = FALSE, 
                                       raster.height = 1000, 
                                       raster.width = 1000,
                                       r2.buffer = NULL,
                                       plot = TRUE,
                                       ...)

  makePlot.overlapMismatch.byBase(plotter, 
                                  noIndel = TRUE, 
                                  plot.rates = TRUE,
                                  log.y = FALSE, 
                                  y.rate.per.kb = FALSE, 
                                  debugMode, 
                                  draw.vert.dotted.lines = TRUE,
                                  singleEndMode, 
                                  plot = TRUE,
                                  ...)
  
  makePlot.overlapMismatch.byBase.atScore(plotter,
                                     atScore = 41,
                                     overlapScoreMethod = c("pair","min"),
                                     plot.rates = TRUE,
                                     noIndel = TRUE,
                                     log.y = FALSE,
                                     singleEndMode,
                                     rasterize.plotting.area = FALSE,
                                     raster.height = 1000,
                                     raster.width = 1000,
                                     debugMode = DEFAULTDEBUGMODE,
                                     plot = TRUE,
                                     ...)
  

Arguments

plotter

A QoRT_Plotter reference object. See build.plotter.

atScore

Numeric integer. For makePlot.overlapMismatch.byBase.atScore, plot the overlap mismatch rates for each base-pair swap at the given phred score.

If overlapScoreMethod is "min", then this will plot the rate of overlap mismatches where the minimum of the two reads' quality score is atScore. If overlapScoreMethod is "pair", then this will plot the rate of overlap mismatches where both reads have the same quality score, equal to atScore.

overlapScoreMethod

Character string. See documentation for atScore, above.

plot.rates

A logical value indicating whether or not to plot mismatch rates or mismatch counts.

log.y

Logical. If TRUE, the y-axis will be log-scaled.

noIndel

Logical. If TRUE, only count overlapping reads if both reads have no aligned indels.

draw.decade.lines

Logical. If TRUE, draw mini tick lines at decade points on the y-axis when plotting in log-scale.

xlim

Numeric. The x-axis limits. If NULL, the x-limits will be autodetected using the pct.cutoff value.

pct.cutoff

Numeric. The percentile cutoff value for the x-axis upper limit.

debugMode

Logical. If TRUE, debugging data will be printed to the console.

singleEndMode

Logical. Determines whether the dataset consists of single-ended reads. By default this is determined from the data. Thus, this parameter should never need to be set by the user.

rasterize.plotting.area

Logical. If TRUE, then "flatten" the plotting lines into a raster format. This requires support for png file creation and the installation of the "png" package. Only the plotting lines will be rasterized, the axes and annotations will be vector format. Default is FALSE.

raster.height

Numeric integer. If rasterize.plotting.area is TRUE, then this will set the height of the rasterized plot, in pixels.

raster.width

Numeric integer. If rasterize.plotting.area is TRUE, then this will set the width of the rasterized plot, in pixels.

r2.buffer

Numeric. The desired distance between the read1/read2 sub-plots.

plot

Logical. If FALSE, suppress plotting and return TRUE if and only if the data is present in the dataset to allow plotting. Useful to automatically filter out missing data plots.

y.rate.per.kb

Logical. If TRUE, the y axis should be labelled in overlap rate per kilobase.

draw.vert.dotted.lines

Logical. If TRUE, draw dotted lines at decade y axis points.

...

Arguments to be passed to methods, such as graphical parameters (see par).

Details

These plotting functions create plots that summarize the overlap-mismatch between paired end reads. When paired-end reads overlap, the sequence on the two reads can be compared in order to estimate the sequencer error rate. This error rate can be visualized in a variety of ways to detect sequencer artifacts or errors.

makePlot.overlap.coverage: The rates at which each position in read 1 and read 2 are covered by the other read. x-axis: Read position. y-axis: How often the given position on the given read is covered by the other read.

makePlot.overlap.mismatchCountPerRead: A histogram of the amount of mismatch between the two reads. x-axis: Number of mismatches. y-axis: How often a read is observed with the given number of mismatches.

makePlot.overlap.mismatch.byMinQual: The mismatch rate as a function of the minimum of the two base quality scores. x-axis: Minimum quality score y-axis: Mismatch rate.

makePlot.overlap.mismatch.byAvgQual: The mismatch rate as a function of the average of the two base quality scores. x-axis: Average quality score y-axis: Mismatch rate.

makePlot.overlap.mismatch.byReadQual: The mismatch rate as a function of each read's quality score. x-axis: Quality score for read 1 and read 2. y-axis: Mismatch rate.

makePlot.overlap.mismatch.byBase: The rate at which overlap-mismatches occur for each possible base-pair swap. x-axis: Read1/read2 base-pair values (note: read2 base is complemented). y-axis: Mismatch rate.

See Also

build.plotter

Examples

  data(res,package="QoRTsExampleData");
  plotter <- build.plotter.colorByGroup(res);
  makePlot.overlap.coverage(plotter)
## Starting: Overlap Coverage plot.
## Finished: Overlap Coverage plot.[time: 2018-09-25 13:12:55],[elapsed: 0.12 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.size(plotter)
## Starting: Overlap Mismatch Size Frequency plot.
## Finished: Overlap Mismatch Size Frequency plot.[time: 2018-09-25 13:12:55],[elapsed: 0.14 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.byCycle(plotter)
## Starting: Overlap Mismatch by Read Cycle plot.
## Finished: Overlap Mismatch by Read Cycle plot.[time: 2018-09-25 13:12:55],[elapsed: 0.24 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.byQual.min(plotter)
## Starting: Overlapping Mismatch by Min Qual plot.
## Finished: Overlapping Mismatch by Min Qual plot.[time: 2018-09-25 13:12:55],[elapsed: 0.14 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.byQual.read(plotter)
## Starting: Overlap Mismatch by Read Qual plot.
## Finished: Overlap Mismatch by Read Qual plot.[time: 2018-09-25 13:12:56],[elapsed: 0.19 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.byBase(plotter)
## Starting: Overlap Mismatch Combinations plot.
## Finished: Overlap Mismatch Combinations plot.[time: 2018-09-25 13:12:56],[elapsed: 0.15 secs]

plot of chunk unnamed-chunk-1

  makePlot.overlapMismatch.byBase.atScore(plotter)
## Starting: Overlap Mismatch Pairs At Phred == 41 plot.
## Finished: Overlap Mismatch Pairs At Phred == 41 plot.[time: 2018-09-25 13:12:56],[elapsed: 0.17 secs]

plot of chunk unnamed-chunk-1


[Package QoRTs version 1.3.6 Index]