| BrowserSession-class {rtracklayer} | R Documentation |
Class "BrowserSession"
Description
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.
Objects from the Class
A virtual Class: No objects may be
created from it. See browserSession for obtaining
an instance of an implementation for a particular genome browser.
Methods
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.
- virtual
browserView(object, range = range(object), track = trackNames(object), ...) -
Constructs a
BrowserViewofrangefor this session. - virtual
browserViews(object, ...) -
Gets the
BrowserViewinstances belonging to this session. activeView(object, ...)-
Returns the
BrowserViewthat is currently active in the session. Fallback callsbrowserViewsand queries each view withactiveView. range(x, ...)-
Gets the
GRangesrepresenting the range of the genome currently displayed by the browser (i.e. the range shown by the active view) or a default value (possiblyNULL) if no views exist. - virtual
getSeq(object, range = range(object), ...) -
gets a genomic sequence of
rangefrom this session. - virtual
sequence(object, ...) <- value -
Loads a sequence into the session.
- virtual
track(object, name = deparse(substitute(track)), view = TRUE, ...) <- value -
Loads one or more
tracks into the session and optionally open aviewof the track. x[[i]] <- valueLoads the track
valueinto sessionx, under the namei. Shortcut to above.x$name <- valueLoads the track
valueinto sessionx, under the namename. Shortcut to above.- virtual
track(object, ...) -
Gets a track from a session.
x[[i]]Gets the track named
ifrom sessionx. A shortcut totrack.x$nameGets the track named
namefrom sessionx. A shortcut totrack.- virtual
trackNames(object, ...) -
Gets the names of the tracks stored in this session.
- virtual
genome(x),genome(x) <- value -
Gets or sets the genome identifier (e.g. “hg18”) for the session.
- virtual
close(con, ...) Close this session.
show(object, ...)Output a textual description of this session.
Author(s)
Michael Lawrence
See Also
browserSession for obtaining implementations of this
class for a particular genome browser.