Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/coverage.targetlength.plot.R
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.
1 | 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.