Learn R Programming

Genominator (version 1.26.0)

computeCoverage: Compute effort-coverage values

Description

Compute fraction coverage obtained for a certain degree of sequencing effort.

Usage

computeCoverage(expData, annoData, cutoff = function(x, anno, group) { x > 10 }, effort = seq(1e+05, 5e+07, length = 20), smooth = function(probs) { probs }, groups = rep("ALL", length(what)), what = getColnames(expData, all = FALSE), totals = summarizeExpData(expData, what = what, verbose = verbose), ignoreStrand = FALSE, verbose = getOption("verbose"), ...)

Arguments

expData
An ExpData object.
annoData
A data frame which must contain the columns chr, start, end and strand which specifies annotation regions of interest.
cutoff
A predicate which determines when a region of annotation has been "sequenced". This function takes three arguments x = number of reads in region, anno = the annotation description of the region, group = the group it is in.
effort
Effort is a vector of how much sequencing has been done.
smooth
A function which takes as input the vector of probabilities and must return the probabilities.
groups
The different groups for which to calculate coverage.
what
The different columns, must be the same length as the groups.
totals
The lane totals, or some other totals. This allows us to estimate the sampling probability vector.
ignoreStrand
Whether or not to add over strands.
verbose
Do you want to see output.
...
Extra argument passed to cutoff.

Value

Returns an object of class genominator.coverage. Pretty much you'll want to call plot on this object.

Details

This argument is pretty general as different ways of specifying the arguments allows one to compute "coverage" under a lot of different definitions.

See Also

See the plot.genominator.coverage for the plotting method and the Genominator vignette for details.

Examples

Run this code
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, smooth = FALSE)
names(a)

Run the code above in your browser using DataLab