Description Usage Arguments Details Value Author(s) See Also Examples
This function accepts one or more objects that are reduced, with a
user-specified function, to a single GenomeData
instance.
1 |
f |
An object of class |
... |
Objects to be reduced. All objects should be of the same class, as
dictated by methods defined on |
init |
An R object of the same kind as the elements of .... |
right |
A logical indicating whether to proceed from left to right (default) or right to left. |
accumulate |
A logical indicating whether the successive reduce combinations should be accumulated. By default, only the final combination is used. |
gdArgs |
Additional arguments passed to the |
The gdReduce
method for GenomeData objects successively
combines GenomeData elements of ...
using f
;
all arguments assigned to ...
must be of class GenomeData.
f
is a function accepting two objects returned by "[["
applied to the successive elements of ...
, returning a single
GenomeData object to be used in subsequent calls to f
.
init
, right
, and accumulate
are as described for
Reduce
. gdArgs
can be used to provide metadata
information to the constructor used to create the final GenomeData
object.
Currently the gdReduce
method for GenomeDataList objects
works when a single GenomeDataList object x
is provided
as ...
and it does gdReduce(f, x[[1]], x[[2]] ... x[[N]],
init, right, accumulate, gdArgs)
where N
is the length of x
i.e. the number of GenomeData objects in it.
An object of class GenomeData
, containing elements
corresponding to the intersection of all named elements of
...
(in the case of the method for GenomeData objects)
or all elements in the single GenomeDataList object passed to
it (in the case of the method for GenomeDataList objects).
Martin Morgan
Reduce
,
GenomeData-class,
GenomeDataList-class
1 2 3 4 5 6 7 8 9 10 11 12 13 | gdReduce
showMethods("gdReduce")
gd <- GenomeData(list(chr1 = IRanges(1, 10), chrX = IRanges(2, 5)),
organism = "Mmusculus", provider = "UCSC",
providerVersion = "mm9")
gdr <- gdReduce(function(x, y) {
## "[[" returns IRanges instances, construct a synthetic version
IRanges(c(start(x), start(y)), c(end(x), end(y)))
}, GenomeDataList(list(gd, gd[2])))
gdr[["chr1"]]
gdr[["chrX"]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.