Class Browser
This class is the main interface between JBrowse and embedders
Defined in: Browser.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Browser(params)
Construct a new Browser object.
|
| Method Attributes | Method Name and Description |
|---|---|
|
navigateTo(loc)
navigate to a given location
|
|
|
showTracks(trackNameList)
load and display the given tracks
|
|
Class Detail
Browser(params)
Construct a new Browser object.
- Parameters:
- params
- a dictionary with the following keys:
containerID- ID of the HTML element that contains the browserrefSeqs- list of reference sequence information items (usually from refSeqs.js)trackData- list of track data items (usually from trackInfo.js)dataRoot- (optional) URL prefix for the data directorybrowserRoot- (optional) URL prefix for the browser codetracks- (optional) comma-delimited string containing initial list of tracks to viewlocation- (optional) string describing the initial locationdefaultTracks- (optional) comma-delimited string containing initial list of tracks to view if there are no cookies and no "tracks" parameterdefaultLocation- (optional) string describing the initial location if there are no cookies and no "location" parameter
Method Detail
navigateTo(loc)
navigate to a given location
gb=dojo.byId("GenomeBrowser").genomeBrowser
gb.navigateTo("ctgA:100..200")
gb.navigateTo("f14")
- Parameters:
- loc
- can be either:
<chromosome>:<start> .. <end>
<start> .. <end>
<center base>
<feature name/ID>
showTracks(trackNameList)
load and display the given tracks
gb=dojo.byId("GenomeBrowser").genomeBrowser
gb.showTracks("DNA,gene,mRNA,noncodingRNA")
- Parameters:
- trackNameList
- {String} comma-delimited string containing track names, each of which should correspond to the "label" element of the track information dictionaries
{String}
visibleRegion()
- Returns:
- {String} string representation of the current location
(suitable for passing to navigateTo)
{String}
visibleTracks()
- Returns:
- {String} containing comma-separated list of currently-viewed tracks
(suitable for passing to showTracks)