RleViewsList-class          package:IRanges          R Documentation

List of RleViews

Description:

     An extension of 'RangesList' that holds only 'RleViews' objects.
     Useful for storing coverage vectors over a set of spaces (e.g.
     chromosomes), each of which requires a separate 'RleViews' object.
     As a 'Sequence', 'RleViewsList' may be annotated with its universe
     identifier (e.g. a genome) in which all of its spaces exist.

Details:

     For more information on methods available for RleViewsList objects
     consult the man pages for RangesList and Views-utils.

Constructor:


      'RleViewsList(..., rleList, rangesList, universe = NULL)': Either
          '...' or the 'rleList'/'rangesList' couplet provide the
          RleViews for the list. If '...' is provided, each of these
          arguments must be RleViews objects. Alternatively, 'rleList'
          and 'rangesList' accept Rle and Ranges objects respectively
          that are meshed together for form the RleViewsList. The
          universe is specified by the 'universe' parameter, which
          should be a single string or NULL, to leave unspecified. 

      'Views(subject, start=NULL, end=NULL, width=NULL, names=NULL)':
          Same as 'RleViewsList(rleList = subject, rangesList =
          start)'.


Coercion:

     In the code snippets below, 'from' is an RleViewsList object:


      'as(from, "IRangesList")': Creates a 'CompressedIRangesList'
          object containing the view locations in 'from'.

      'as(from, "CompressedIRangesList")': Creates a
          'CompressedIRangesList' object containing the view locations
          in 'from'.

      'as(from, "SimpleIRangesList")': Creates a 'SimpleIRangesList'
          object containing the view locations in 'from'.


Author(s):

     P. Aboyoun

See Also:

     RangesList-class, Views-utils

Examples:

       ## Rle objects
       subject1 <- Rle(c(3L,2L,18L,0L), c(3,2,1,5))
       set.seed(0)
       subject2 <- Rle(c(0L,5L,2L,0L,3L), c(8,5,2,7,4))

       ## Views
       rleViews1 <- Views(subject1, 3:0, 5:8)
       rleViews2 <- Views(subject2, subject2 > 0) 

       ## RleList and RangesList objects
       rleList <- RleList(subject1, subject2)
       rangesList <- IRangesList(IRanges(3:0, 5:8), IRanges(subject2 > 0))

       ## methods for construction
       method1 <- RleViewsList(rleViews1, rleViews2)
       method2 <- RleViewsList(rleList = rleList, rangesList = rangesList)
       identical(method1, method2)

       ## calculation over the views
       viewSums(method1)

