Learn R Programming

MutableRanges (version 0.6.2)

ProxyGRanges-class: ProxyGRanges objects

Description

A ProxyGRanges is a DynamicGRanges that retrieves its data from another GenomicRanges and computes on it before returning the data to the client. It essentially represents a dynamic operation on genomic data. The user should subclass ProxyGRanges to implement the computation; see setProxyGRangesClass, below.

Usage

setProxyGRangesClass(prefix, compute = NULL, reverseCompute = NULL,
           arity = c("auto", "unary", "binary", "multinary"),
           destructive = TRUE, parameters = list(),
           parameterDefaults = list(),
           extraFields = list(), extraMethods = list(),
           contains = "ProxyGRanges", where = topenv(parent.frame()), ...)

Arguments

prefix
Prefix for the class name, appended to GRanges
compute
The function that computes on the data. Passed an argument for each operand GenomicRanges, as well as an argument for each parameter. May be NULL if not implemented, which is useful when defining virtual subclasses. If arity is multinary and this function takes two formal arguments, a wrapper is produced using Reduce.
reverseCompute
The function that performs the reverse computation, i.e., identical(x, reverseCompute(compute(x))) should be TRUE, at least in theory. Often, reverse computation is not possible. If this always true for a given operation, NULL may be provided, in which case attempts to send data down the reverse pipeline will fail.
arity
The number of operands that a given operation supports. This is mostly for allowing interfaces like GUIs to accurately convey the capabilities of an operation. As an example, a filter would typically be unary, whereas addition would be binary, and union could be multinary. By default, the arity is automatically determined from the formal arguments of compute. If ...

Value

  • The generator object for the new proxy class. As a side effect, this function defines two classes: one derivative of ProxyGRanges (named PrefixGRanges) and one derivative of PropertySet (named PrefixParameters) with the parameters. If the proxy class is non-virtual, a constructor for each of those classes is also defined in where. These are of the form:
  • PrefixGRanges(operands, parameters, ...): where operands is a GenomicRangesList, parameters is an instance of the corresponding parameters class (optional), and ...
  • contains initial values for additional fields.

code

PrefixGRangesParameters(...)

item

  • destructive
  • parameters
  • parameterDefaults
  • extraFields
  • extraMethods
  • contains
  • where
  • ...

See Also

Various types of operations are supported by ProxyGRanges: TransformGRanges for transforming a metadata column, CoverageGRanges for performing an operation on the coverage (as an Rle), ViewsGRanges for operating on coverage Views, MultiplexGRanges for combining multiple datasets into one, FilterGRanges for filtering, and so on.