Class "BrowserSession"
An object representing a genome browser session. As a
derivative of TrackDb
, each
session contains a set of loaded tracks. In addition, it has
a set of views, in the form of BrowserView
instances, on those tracks. Note that
this is a virtual class; a concrete implementation is provided by each
backend driver.
A virtual Class: No objects may be
created from it. See browserSession
for obtaining
an instance of an implementation for a particular genome browser.
This specifies the API implemented by each browser backend. Note that
a backend is not required to support all operations, and that each
backend often has additional parameters for each of the methods. See
the backend-specific documentation for more details. The only built-in
backend is UCSCSession
.
If a method is denoted as virtual, it must be implemented by the backend to support the corresponding feature. Otherwise, the fallback behavior is described.
browserView(object, range =
range(object), track = trackNames(object), ...)
Constructs a BrowserView
of range
for this session.
browserViews(object, ...)
Gets the BrowserView
instances belonging to
this session.
activeView(object, ...)
Returns the BrowserView
that is currently
active in the session. Fallback calls browserViews
and
queries each view with activeView
.
range(x, ...)
Gets the GRanges
representing the range of the genome currently displayed by the
browser (i.e. the range shown by the active view) or a default
value (possibly NULL
) if no views exist.
getSeq(object, range =
range(object), ...)
gets a genomic sequence of range
from this session.
sequence(object, ...) <- value
Loads a sequence into the session.
track(object, name =
deparse(substitute(track)), view = TRUE, ...) <- value
Loads one or more track
s into the session and optionally open a
view
of the track.
x[[i]] <- value
Loads the track value
into
session x
, under the name i
. Shortcut to above.
x$name <- value
Loads the track value
into
session x
, under the name name
. Shortcut to above.
track(object, ...)
Gets a track from a session.
x[[i]]
Gets the track named i
from session
x
. A shortcut to track
.
x$name
Gets the track named name
from session
x
. A shortcut to track
.
trackNames(object, ...)
Gets the names of the tracks stored in this session.
genome(x)
,
genome(x) <- value
Gets or sets the genome identifier (e.g. “hg18”) for the session.
close(con, ...)
Close this session.
show(object, ...)
Output a textual description of this session.
Michael Lawrence
browserSession
for obtaining implementations of this
class for a particular genome browser.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.