R/reduceRanges.R

Defines functions reduceRanges

Documented in reduceRanges

### =========================================================================
### reduceRanges
### =========================================================================

reduceRanges <- function(ranges, files, MAP, REDUCE, ..., init) {
    if (is(ranges, "GenomicFiles")) {
        files <- GenomicFiles::files(ranges)
        ranges <- rowRanges(ranges)
    }
    if (!is(ranges, "GRanges") && !is(ranges, "GRangesList"))
        stop("'ranges' must be GRanges or GRangesList")

    .reduceByRange(ranges, list(files), MAP, REDUCE, ..., 
                   iterate=FALSE)
}

Try the GenomicFiles package in your browser

Any scripts or data that you put into this service are public.

GenomicFiles documentation built on Nov. 8, 2020, 7:48 p.m.