### Title: Set of hits between 2 vector-like objects
### Aliases: Hits-class Hits length,Hits-method subjectHits
###   subjectHits,Hits-method queryHits queryHits,Hits-method queryLength

as.table(t(overlaps)) # hits per subject
hits1 <- remapHits(overlaps, subject.map=factor(c("e", "e", "d"), letters[1:5]))
hits2 <- remapHits(overlaps, subject.map=c(5, 5, 4), new.subjectLength=5)

### Title: Inter range transformations of a Ranges, Views, RangesList,
###   MaskCollection, or RangedData object
## On a RangesList object (XVector package required):
## Use the mapping from reduced to original ranges to split the DataFrame
## of original metadata columns by reduced range:
## On a RangesList object. These 4 are the same:
## Sliding an empty range along a non-empty range:

range1 <- IRanges(start=c(1, 2, 3), end=c(5, 2, 8))
range3 <- IRanges(start=c(-2, 6, 7), width=c(8, 0, 0))  # with empty ranges
collection <- IRangesList(one=range1, range2, range3)
y <- reduce(x, drop.empty.ranges=TRUE, with.mapping=TRUE)
relist(mcols(ir0)[unlist(mapping), ], mapping)  # a SplitDataFrameList
res2 <- IRangesList(one=reduce(range1), reduce(range2), reduce(range3))
res3 <- do.call(IRangesList, lapply(collection, reduce))
chrA=IRanges(start=c(1, 4, 6), width=c(3, 2, 4)),
chrB=IRanges(start=c(1, 3, 6), width=c(3, 3, 4))),
v <- Views(subject, start=c(8, 3), end=c(14, 4))
res2 <- IRangesList(one=gaps(range1), gaps(range2), gaps(range3))
res3 <- do.call(IRangesList, lapply(collection, gaps))
mask2 <- Mask(mask.width=29, start=c(3, 10, 27), width=c(5, 8, 1))
mask3 <- Mask(mask.width=29, start=c(7, 12), width=c(2, 4))
mymasks <- append(append(mask1, mask2), mask3)
function(i) compare(IRanges(i, width=0), IRanges(12, 15)))
function(i) isDisjoint(c(IRanges(i, width=0), IRanges(12, 15))))

## query and subject are easily interchangeable

### Title: Intra range transformations of a Ranges, Views, RangesList, or
### Aliases: intra-range-methods shift shift,Ranges-method
###   promoters,IntervalForest-method reflect reflect,Ranges-method resize
## reflect() does not yet support RangesList objects!
## threebands() does not support RangesList objects.