R/maskOut.R

Defines functions maskOut

Documented in maskOut

maskOut <- function(x, ranges){

    if(class(ranges) != "GRanges"){
        stop("ranges must be of class GRanges")
    }

    fo <- findOverlaps(ranges, windows(x))

    mask <- logical(length(x))
    mask[subjectHits(fo)] <- TRUE

    maskEmpBayes(x) <- mask
    return(x)
}

Try the Repitools package in your browser

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

Repitools documentation built on Nov. 8, 2020, 7:52 p.m.