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
 
addConfigData(config_data)
Merge in some additional configuration data.
 
Add a function to be executed once JBrowse is initialized
 
addRefseqs(refSeqs)
 
fatalError(error)
Displays links to configuration help in the main window.
 
Instantiate the right config adaptor for a given configuration source.
 
 
Load our configuration file(s) based on the parameters thex constructor was passed.
 
Load our name index.
 
 
 
 
navigate to a given location
 
 
 
Event that fires when the reference sequences have been loaded.
 
 
 
showTracks(trackNameList)
load and display the given tracks
 
Examine the loaded and merged configuration for errors.
 
 
Class Detail
Browser(params)
Construct a new Browser object.
Parameters:
params
an object with the following properties:
  • config - list of objects with "url" property that points to a config JSON file
  • containerID - ID of the HTML element that contains the browser
  • refSeqs - object with "url" property that is the URL to list of reference sequence information items
  • 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
  • show_nav - (optional) string describing the on/off state of navigation box
  • show_tracklist - (optional) string describing the on/off state of track bar
  • show_overview - (optional) string describing the on/off state of overview
Method Detail
addConfigData(config_data)
Merge in some additional configuration data. Properties in the passed configuration will override those properties in the existing configuration.
Parameters:
{Object} config_data

addDeferred(f)
Add a function to be executed once JBrowse is initialized
Parameters:
f
function to be executed

addRefseqs(refSeqs)
Parameters:
refSeqs
{Array} array of refseq records to add to the browser

fatalError(error)
Displays links to configuration help in the main window. Called when the main browser cannot run at all, due to configuration errors or whatever.
Parameters:
error

{Object} getConfigAdaptor(config)
Instantiate the right config adaptor for a given configuration source.
Parameters:
{Object} config
the configuraiton
Returns:
{Object} the right configuration adaptor to use, or undefined if one could not be found

initView()

loadConfig()
Load our configuration file(s) based on the parameters thex constructor was passed. Does not return until all files are loaded and merged in.
Returns:
nothing meaningful

loadNames()
Load our name index.

loadRefSeqs()

makeBookmarkLink(area)
Parameters:
area

makeHelpDialog()

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>

navigateToLocation(location)
Parameters:
location

onConfigLoaded()

onRefSeqsLoaded()
Event that fires when the reference sequences have been loaded.

onResize()

searchNames(loc)
Parameters:
loc

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

validateConfig()
Examine the loaded and merged configuration for errors. Throws exceptions if it finds anything amiss.
Returns:
nothing meaningful

{String} visibleRegion()
Returns:
{String} locstring 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.4.0 on Thu Apr 19 2012 17:55:40 GMT-0400 (EDT)