\HeaderA{RangedSelection-class}{Selection of ranges and columns}{RangedSelection.Rdash.class}
\aliasA{coerce,RangesList,RangedSelection-method}{RangedSelection-class}{coerce,RangesList,RangedSelection.Rdash.method}
\aliasA{colnames,RangedSelection-method}{RangedSelection-class}{colnames,RangedSelection.Rdash.method}
\aliasA{colnames<-,RangedSelection-method}{RangedSelection-class}{colnames<.Rdash.,RangedSelection.Rdash.method}
\aliasA{RangedSelection}{RangedSelection-class}{RangedSelection}
\aliasA{ranges,RangedSelection-method}{RangedSelection-class}{ranges,RangedSelection.Rdash.method}
\aliasA{ranges<-,RangedSelection-method}{RangedSelection-class}{ranges<.Rdash.,RangedSelection.Rdash.method}
\keyword{methods}{RangedSelection-class}
\keyword{classes}{RangedSelection-class}
\begin{Description}\relax
A \code{RangedSelection} represents a query against a table
of interval data in terms of ranges and column names. The ranges
select any table row with an overlapping interval. Note that the
intervals are always returned, even if no columns are selected.
\end{Description}
\begin{Details}\relax
Traditionally, tabular data structures have supported the
\code{\LinkA{subset}{subset}} function, which allows one to select a subset of
the rows and columns from the table. In that case, the rows and
columns are specified by two separate arguments. As querying interval
data sources, especially those external to R, such as binary indexed
files and databases, is increasingly common, there is a need to
encapsulate the row and column specifications into a single data
structure, mostly for the sake of interface
cleanliness. The \code{RangedSelection} class fills that role.
\end{Details}
\begin{Section}{Constructor}
\describe{
\item[] \code{RangedSelection(ranges = RangesList(),
        colnames = character())}: Constructors a \code{RangedSelection}
with the given \code{ranges} and \code{colnames}.

}
\end{Section}
\begin{Section}{Coercion}
\describe{
\item[] \code{as(from, "RangedSelection")}: Coerces \code{from} to a
\code{RangedSelection} object. Typically, \code{from} is a
\code{\LinkA{RangesList}{RangesList.Rdash.class}}, the ranges of which become the
ranges in the new \code{RangedSelection}.

}
\end{Section}
\begin{Section}{Accessors}
In the code snippets below, \code{x} is always a \code{RangedSelection}.
\describe{
\item[] \code{ranges(x), ranges(x) <- value}: Gets or sets the
ranges, a \code{\LinkA{RangesList}{RangesList.Rdash.class}}, that select rows with
overlapping intervals.

\item[] \code{colnames(x), colnames(x) <- value}: Gets the 
names, a \code{character} vector, indicating the columns.

}
\end{Section}
\begin{Author}\relax
Michael Lawrence
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  rl <- RangesList(chr1 = IRanges(c(1, 5), c(3, 6)))

  RangedSelection(rl)
  as(rl, "RangedSelection") # same as above

  RangedSelection(rl, "score")
\end{ExampleCode}
\end{Examples}

