Class Index | File Index

Classes


Class Browser

This class is the main interface between JBrowse and embedders
Defined in: Browser.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Browser(params)
Construct a new Browser object.
Method Summary
Method Attributes Method Name and Description
 
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 browser
  • refSeqs - 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 directory
  • browserRoot - (optional) URL prefix for the browser code
  • tracks - (optional) comma-delimited string containing initial list of tracks to view
  • location - (optional) string describing the initial location
  • defaultTracks - (optional) comma-delimited string containing initial list of tracks to view if there are no cookies and no "tracks" parameter
  • defaultLocation - (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)

Documentation generated by JsDoc Toolkit 2.1.0 on Sat Jun 13 2009 17:56:25 GMT-0700 (PDT)