Interaction binding | R Documentation |
Methods to combine InteractionSet or GInteractions objects.
## S4 method for signature 'GInteractions'
c(x, ..., recursive=FALSE)
## S4 method for signature 'InteractionSet'
rbind(..., deparse.level=1)
## S4 method for signature 'InteractionSet'
cbind(..., deparse.level=1)
x |
A GInteractions or InteractionSet object. |
... |
For |
deparse.level |
An integer scalar; see |
recursive |
An integer scalar, ignored. |
A combined object of the same class as x
.
c
will concatenate GInteractions objects.
It will check whether the regions
slot of all supplied objects are the same, in which case the regions and anchor indices are used directly.
Otherwise, the regions
slot is set to a new GRanges object consisting of the (sorted) union of all regions
across the input objects.
Anchor indices in each object are refactored appropriately to refer to the relevant entries in the new GRanges.
Note that the column names in mcols
must be identical across all supplied objects.
The column names of mcols
for the regions
slot must also be identical across objects.
If GInteractions objects of different strictness (i.e., StrictGInteractions and ReverseGInteractions) are concatenated,
the returned object will be of the same class as the first supplied object.
cbind
will combine objects with the same interactions but different samples.
Errors will occur if the interactions are not identical between objects (i.e., must have same values in the interactions
slots).
Additional restrictions apply on the column and assay names - see cbind,SummarizedExperiment-method
for details.
rbind
will combine objects with the same samples but different interactions.
In this case, the interactions need not be identical, and will be concatenated using the methods described above for GInteractions objects.
Again, additional restrictions apply - see rbind,SummarizedExperiment-method
for details.
Aaron Lun
InteractionSet-class
GInteractions-class
example(GInteractions, echo=FALSE)
c(gi, gi)
new.gi <- gi
regions(new.gi) <- resize(regions(new.gi), width=20, fix="start")
c(gi, new.gi)
#################
# Same can be done for an InteractionSet object:
example(InteractionSet, echo=FALSE)
cbind(iset, iset)
rbind(iset, iset)
new.iset <- iset
regions(new.iset) <- resize(regions(new.iset), width=20, fix="start")
rbind(iset, new.iset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.