Description Usage Arguments Details Value Author(s) Examples
Drop unused features in an IndexedRelations object.
1 |
x |
An IndexedRelations object. |
dropUnusedFeatures
will remove features in each element of featureSets(x)
that are not referred to by any partner in any relationship.
All partner indices are remapped to the appropriate locations in the subsetted feature sets.
The only features that remain will have at least one index pointing to it in partners(x)
.
This function can reduce the size of an IndexedRelations object, e.g., during serialization to file. However, it is usually unnecessary to run these during the course of an analysis. R operates on a copy-on-modify principle, so the same feature set(s) across multiple IndexedRelations objects do not occupy additional memory. Dropping unused features requires construction of instance-specific feature sets that may increase memory usage.
An IndexedRelations object where any unused features have been removed.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 | library(GenomicRanges)
promoters <- GRanges("chrA", IRanges(1:10*20, 1:10*20+10))
enhancers <- GRanges("chrA", IRanges(1:20*10, 1:20*10+10))
rel <- IndexedRelations(list(1:2, 1:2), list(promoters, enhancers))
lengths(featureSets(rel))
# Only the first two entries of each feature set are retained.
dropped <- dropUnusedFeatures(rel)
lengths(featureSets(dropped))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.