plot.genominator.coverage: Create coverage plot

Description Usage Arguments Value Author(s) See Also Examples

View source: R/coverage.R

Description

S3 method to plot genominator.coverage object. Shows coverage as a function of plotting effort.

Usage

1
2
3
## S3 method for class 'genominator.coverage'
plot(x, type = "l", col = NULL,
  draw.totals = TRUE, draw.legend = TRUE, legend.location = NULL, ...)

Arguments

x

An object of class genominator.coverage, as returned by computeCoverage.

type

Plot type. See plot.

col

Vector of plotting colors.

draw.totals

Logical indicating whether totals should be drawn.

draw.legend

Logical indicating whether legend should be drawn.

legend.location

Vector giving x and y coordinates of legend position.

...

Additional arguments for lower-level functions.

Value

This method is used for its side effect.

Author(s)

James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu

See Also

See Genominator vignette for more information. See also computeCoverage.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ed <- ExpData(system.file(package = "Genominator", "sample.db"),
              tablename = "raw")
data("yeastAnno")
a <- computeCoverage(ed, yeastAnno, effort = 2^(5:18),
                     cutoff = function(x, ...) x > 1)
plot(a, lwd = 5, col = "grey")
plot(a, draw.totals = FALSE)
ygroups <- rep(c("mut", "wt"), c(2,2))
b <- computeCoverage(ed, yeastAnno, grups = ygroups,
                     effort = 2^(5:18), cutoff = function(x, ...) x > 1)
plot(b)
b <- computeCoverage(ed, yeastAnno, groups = ygroups,
                     effort = 2^(5:18), cutoff = function(x, ...) x > 3,
                     smooth = function(probs) {
                       probs = probs + min(probs[probs!=0])
                       probs = probs/sum(probs)
                     })
plot(b)

Genominator documentation built on Oct. 31, 2019, 8:56 a.m.