coverage.targetlength.plot {TEQC} | R Documentation |
Plots either numbers of on-target reads or average per-target coverage (or potentially other per-target values) against respective target lengths. A smoothing spline is added to the scatter plot.
coverage.targetlength.plot(targets, plotcolumn, linecol = 2, xlab, ylab, lwd, pch, cex, ...)
targets |
|
plotcolumn |
name or index of column to plot (of the 'values' DataFrame within |
linecol |
color of spline curve |
xlab, ylab |
x- and y-axis labels |
lwd |
line width of spline curve |
pch |
plotting character |
cex |
size of plotting character |
... |
further graphical parameters, passed to |
coverage.target
and readsPerTarget
can be used to calculate
average per-target coverages and numbers of reads overlapping each target. The values are
added to the RangedData
table containing the target positions. Such RangedData
table can then be used for plotting the calculated values against the respecitve target lengths.
A scatterplot with the given per-target values on the y-axis and corresponding target lengths on the x-axis. A smoothing spline is added to the plot.
Manuela Hummel m.hummel@dkfz.de
coverage.target
, readsPerTarget
, covered.k
, coverage.hist
,
coverage.uniformity
, coverage.plot
## get reads and targets exptPath <- system.file("extdata", package="TEQC") readsfile <- file.path(exptPath, "ExampleSet_Reads.bed") reads <- get.reads(readsfile, idcol=4, skip=0) targetsfile <- file.path(exptPath, "ExampleSet_Targets.bed") targets <- get.targets(targetsfile, skip=0) ## get average per-target coverage Coverage <- coverage.target(reads, targets, perTarget=TRUE) targets2 <- Coverage$targetCoverages ## get numbers of reads per target targets2 <- readsPerTarget(reads, targets2) ## coverage vs target length coverage.targetlength.plot(targets2, plotcolumn="avgCoverage", pch="o") ## coverage vs number of reads per target coverage.targetlength.plot(targets2, plotcolumn="nReads", pch="o")