makePlot.insert.size {QoRTs} | R Documentation |
Plots the distribution of the size of the region covered by the two paired reads.
makePlot.insert.size(plotter, calc.rate = TRUE, pct.cutoff = 0.98, plot.medians = TRUE, plot.means = NULL, debugMode, singleEndMode, ...)
plotter |
A |
calc.rate |
A logical value indicating whether or not to calculate and plot the rate at which each insert size occurs as the y-axis. If this is set to false, it will instead plot the total number of times each insert size occurs. |
pct.cutoff |
A numeric value between 0 and 1, indicating the quantile within which to limit the x-axis. Generally the default value of 0.98 is perfectly usable. |
plot.means |
A logical value indicating whether or not to plot the mean average for each bamfile at the bottom of the plot. |
plot.medians |
A logical value indicating whether or not to plot the median
average for each bamfile at the bottom of the plot.
Overrides |
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. |
... |
Arguments to be passed to methods, such as
graphical parameters (see |
x-axis: The insert size. This is the genomic distance from the start of one read to the end of the other. In other words, the size of the full region covered by the paired reads.
y-axis: The rate at which the given insert size occurs, for each bamfile.
Note: The insert size is calculated by using the alignment as well as the provided gene/splice-junction annotation.
If the paired reads align to overlapping regions of the reference genome, then the insert size can be calculated exactly. This is NOT dependant on the annotation. If the two reads align inconsistantly (for example, one read showing a splice junction and the other not), then the read is ignored.
If the paired reads do NOT overlap, then the annotation information is required. Using the full set of all known splice junctions that lie between the inner alignment endpoints for the two reads, the shortest possible path from the two endpoints is found. In some rare cases this may underestimate the insert size, if the actual insert does not take the minimal path, but this is rare. In other (somewhat more common) cases this may overestimate the insert size, when the region between the paired reads bridges an unannotated splice junction.
data(res,package="QoRTsExampleData");
plotter <- build.plotter.colorByGroup(res);
makePlot.insert.size(plotter);
## Starting: Insert Size plot.
## Finished: Insert Size plot.[time: 2016-01-28 16:33:00],[elapsed: 0.1 secs]