UCSCSession-class {rtracklayer} | R Documentation |
Class "UCSCSession"
Description
An implementation of BrowserSession
for the UCSC genome browser.
Objects from the Class
Objects can be created by calls of the form
browserSession("ucsc", url =
"https://genome.ucsc.edu/cgi-bin", ...)
. The arguments in ...
correspond to libcurl options, see
getCurlHandle
. Setting these options may be
useful e.g. for getting past a proxy.
Slots
url
:Object of class
"character"
holding the base URL of the UCSC browser.hguid
:Object of class
"numeric"
holding the user identification code.views
:Object of class
"environment"
containing a list stored under the name "instances". The list holds the instances ofBrowserView
for this session.
Extends
Class "BrowserSession"
, directly.
Methods
browserView(object, range = range(object), track = trackNames(object), ...)
Creates a
BrowserView
ofrange
with visible tracks specified bytrack
.track
may be an instance ofUCSCTrackModes
. Arguments in...
should match parameters to aucscTrackModes
method for creating aUCSCTrackModes
instance that will be merged with and override modes indicated by thetrack
parameter.browserViews
(object)Gets the
BrowserView
instances for this session.range
(x)Gets the
GRanges
last displayed in this session.genome(x)
Gets the genome identifier of the session, i.e.
genome(range(x))
.seqinfo
Gets the
Seqinfo
object with the lengths of the chromosomes in the currenet genome. No circularity information is available.range(x) <- value
Sets
value
, usually aGRanges
object orIntegerRangesList
, as the range of sessionx
. Note that this setting only lasts until a view is created or manipulated. This mechanism is useful, for example, when treating the UCSC browser as a database, rather than a genome viewer.genome(x) <- value
-
Sets the genome identifier on the range of session
x
. getSeq(object, range, track = "Assembly")
-
Gets the sequence in
range
andtrack
. track(object, name = names(track), format = "auto", ...) <- value
-
Loads a track, stored under
name
and formatted asformat
. The "auto" format resolves to "bed" for qualitative data. For quantitative data, i.e., data with a numericscore
column, "wig" or "bedGraph" is chosen, depending on how well the data compresses into wig. The arguments in...
are passed on toexport.ucsc
, so they could be slots in aTrackLine
subclass (and thus specify visual attributes like color) or parameters to pass on to the export function forformat
. Thevalue
may be either a range object (like aGRanges
) or a file object (like aBEDFile
). track(object, name, range = range(object), table = NULL)
-
Retrieves a
GRanges
with features inrange
from track namedname
. Some built-in tracks have multiple series, each stored in a separate database table. A specific table may be retrieved by passing its name in thetable
parameter. SeetableNames
for a way to list the available tables. -
getTable(object, name, range = base::range(object), table = NULL)
: Retrieves the table indicated by the trackname
andtable
name, overrange
, as adata.frame
. SeegetTable
. trackNames
(object)Gets the names of the tracks stored in the session.
ucscTrackModes
(object)Gets the default view modes for the tracks in the session.
Author(s)
Michael Lawrence
See Also
browserSession
for creating instances of this class.