### Aliases: read.Mask read.agpMask read.gapMask read.liftMask read.rmMask
## A. Extract a mask of assembly gaps ("AGAPS" mask) with read.agpMask()
## Note: The hs_b36v3_chrY.agp file was obtained by downloading,
## extracting and renaming the hs_ref_chrY.agp.gz file from
## B. Extract a mask of assembly gaps ("AGAPS" mask) with read.liftMask()
## Note: The hg18liftAll.lft file was obtained by downloading,
## extracting and renaming the liftAll.zip file from
## contigs 7 and 8 for chrY are adjacent
## displays the sequence names found in the file
## C. Extract a RepeatMasker ("RM") or Tandem Repeats Finder ("TRF")
##    mask with read.rmMask() or read.trfMask()
## Note: The ce2chrM.fa.out and ce2chrM.bed files were obtained by
## downloading, extracting and renaming the chromOut.zip and
## Before you can extract a mask with read.rmMask() or read.trfMask(), you
## need to know the length of the sequence that you're going to put the
## Read the RepeatMasker .out file for chrM in ce2:
## Read the Tandem Repeats Finder .bed file for chrM in ce2:
# this would drop all current masks, if any

file1 <- system.file("extdata", "hs_b36v3_chrY.agp", package="IRanges")
mask1 <- read.agpMask(file1, seqname="chrY", mask.width=chrY_length,
mask11 <- read.agpMask(file1, seqname="chrY", mask.width=chrY_length,
file2 <- system.file("extdata", "hg18liftAll.lft", package="IRanges")
file3 <- system.file("extdata", "ce2chrM.fa.out", package="IRanges")
RMmask <- read.rmMask(file3, seqname="chrM", mask.width=chrM_length)
file4 <- system.file("extdata", "ce2chrM.bed", package="IRanges")
TRFmask <- read.trfMask(file4, seqname="chrM", mask.width=chrM_length)
masks(chrM) <- RMmask  # this would drop all current masks, if any

### Aliases: reverse reverse,character-method reverse,IRanges-method

### Aliases: class:Rle Rle-class Rle Rle,missing,missing-method
###   runValue runValue,Rle-method nrun nrun,Rle-method start,Rle-method
###   end,Rle-method width,Rle-method ranges,Rle-method runLength<-
###   Summary,Rle-method Complex,Rle-method [,Rle-method [<-,Rle-method
###   %in%,Rle,ANY-method aggregate.Rle aggregate,Rle-method c,Rle-method
###   findRange findRange,Rle-method findRun findRun,Rle-method
###   match,Rle,ANY-method rep,Rle-method rep.int,Rle-method rev.Rle
###   showAsCell,Rle-method order,Rle-method sort.Rle sort,Rle-method
###   summary.Rle summary,Rle-method table,Rle-method unique.Rle
###   unique,Rle-method duplicated,Rle-method duplicated.Rle window.Rle
###   pmax.int,Rle-method pmin.int,Rle-method which.max,Rle-method diff.Rle
###   diff,Rle-method mean.Rle mean,Rle-method var,Rle,missing-method
###   sd,Rle-method median.Rle median,Rle-method quantile.Rle
###   quantile,Rle-method mad.Rle mad,Rle-method IQR,Rle-method
## runsum, runmean, runwtsum, and runq functions
## The .naive_runsum() function demonstrates the semantics of
## runsum(). This test ensures the behavior is consistent with
## When na.rm = TRUE, it is possible the number of non-NA
## values in the window will be less than the 'i' specified.
## Here we request the 4th smallest value in the window,
## which tranlates to the value at the 4/5 (0.8) percentile.
## The same request on a Rle with two missing values
## finds the value at the 0.8 percentile of the vector
## at the new length of 3 after the NA's have been removed.