| 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
httr_options. 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 ofBrowserViewfor this session.
Extends
Class "BrowserSession", directly.
Methods
browserView(object, range = range(object), track = trackNames(object), ...)Creates a
BrowserViewofrangewith visible tracks specified bytrack.trackmay be an instance ofUCSCTrackModes. Arguments in...should match parameters to aucscTrackModesmethod for creating aUCSCTrackModesinstance that will be merged with and override modes indicated by thetrackparameter.browserViews(object)Gets the
BrowserViewinstances for this session.range(x)Gets the
GRangeslast displayed in this session.genome(x)Gets the genome identifier of the session, i.e.
genome(range(x)).seqinfoGets the
Seqinfoobject with the lengths of the chromosomes in the currenet genome. No circularity information is available.range(x) <- valueSets
value, usually aGRangesobject 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
rangeandtrack. track(object, name = names(track), format = "auto", ...) <- value-
Loads a track, stored under
nameand formatted asformat. The "auto" format resolves to "bed" for qualitative data. For quantitative data, i.e., data with a numericscorecolumn, "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 aTrackLinesubclass (and thus specify visual attributes like color) or parameters to pass on to the export function forformat. Thevaluemay be either a range object (like aGRanges) or a file object (like aBEDFile). track(object, name, range = range(object), table = NULL)-
Retrieves a
GRangeswith features inrangefrom 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 thetableparameter. SeetableNamesfor a way to list the available tables. -
getTable(object, name, range = base::range(object), table = NULL): Retrieves the table indicated by the tracknameandtablename, 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.