\HeaderA{RleViewsList-class}{List of RleViews}{RleViewsList.Rdash.class}
\aliasA{coerce,RleViewsList,CompressedIRangesList-method}{RleViewsList-class}{coerce,RleViewsList,CompressedIRangesList.Rdash.method}
\aliasA{coerce,RleViewsList,IRangesList-method}{RleViewsList-class}{coerce,RleViewsList,IRangesList.Rdash.method}
\aliasA{coerce,RleViewsList,SimpleIRangesList-method}{RleViewsList-class}{coerce,RleViewsList,SimpleIRangesList.Rdash.method}
\aliasA{RleViewsList}{RleViewsList-class}{RleViewsList}
\aliasA{SimpleRleViewsList-class}{RleViewsList-class}{SimpleRleViewsList.Rdash.class}
\aliasA{subject,SimpleRleViewsList-method}{RleViewsList-class}{subject,SimpleRleViewsList.Rdash.method}
\aliasA{Views,RleList-method}{RleViewsList-class}{Views,RleList.Rdash.method}
\keyword{methods}{RleViewsList-class}
\keyword{classes}{RleViewsList-class}
\begin{Description}\relax
An extension of \code{\LinkA{RangesList}{RangesList.Rdash.class}} that holds only
\code{\LinkA{RleViews}{RleViews.Rdash.class}} objects. Useful for storing coverage vectors
over a set of spaces (e.g. chromosomes), each of which requires a separate
\code{RleViews} object. As a \code{Sequence}, \code{RleViewsList} may be
annotated with its universe identifier (e.g. a genome) in which all of its
spaces exist.
\end{Description}
\begin{Details}\relax
For more information on methods available for RleViewsList objects consult
the man pages for \LinkA{RangesList}{RangesList} and \LinkA{Views-utils}{Views.Rdash.utils}.
\end{Details}
\begin{Section}{Constructor}
\describe{
\item[] \code{RleViewsList(..., rleList, rangesList, universe = NULL)}:
Either \code{...} or the \code{rleList}/\code{rangesList} couplet
provide the RleViews for the list. If \code{...} is provided, each
of these arguments must be RleViews objects. Alternatively,
\code{rleList} and \code{rangesList} accept Rle and Ranges objects
respectively that are meshed together for form the RleViewsList.
The universe is specified by the \code{universe} parameter, which
should be a single string or NULL, to leave unspecified. 

\item[] \code{Views(subject, start=NULL, end=NULL, width=NULL, names=NULL)}:
Same as \code{RleViewsList(rleList = subject, rangesList = start)}.

}
\end{Section}
\begin{Section}{Coercion}
In the code snippets below, \code{from} is an RleViewsList object:

\describe{
\item[] \code{as(from, "IRangesList")}: Creates a \code{CompressedIRangesList}
object containing the view locations in \code{from}.

\item[] \code{as(from, "CompressedIRangesList")}: Creates a
\code{CompressedIRangesList} object containing the view locations in
\code{from}.

\item[] \code{as(from, "SimpleIRangesList")}: Creates a \code{SimpleIRangesList}
object containing the view locations in \code{from}.

}
\end{Section}
\begin{Author}\relax
P. Aboyoun
\end{Author}
\begin{SeeAlso}\relax
\LinkA{RangesList-class}{RangesList.Rdash.class},
\LinkA{Views-utils}{Views.Rdash.utils}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  ## 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)
\end{ExampleCode}
\end{Examples}

