R/reduceFiles.R

Defines functions reduceFiles

Documented in reduceFiles

### =========================================================================
### reduceFiles
### =========================================================================

reduceFiles <- 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")

    .reduceByFile(list(ranges), 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.