ModelsTrack

Extends: Browser Track
See also: Mask Track

Screenshots

Gene models track at a zoom level of 5:1
Gene models track at a zoom level of 50:1
Gene models track at a zoom level of 500:1
Text lookup box for gene models

Configuration Options

		
		// Defaults
		var params = {
		
			// Config options inherited from BaseTrack
			id           : Ext.id(),          // a unique ID for the track, if not provided then one will be automatically assigned
			name         : 'Track',           // the name of the track, used in the track selector tree and as the track title
			path         : '',                // path used to position the track in the track selector tree, eg /All Tracks/My Track
			minHeight    : 40,                // the minimum height of the track (if resizable)
			maxHeight    : 1000,              // the maximum height of the track (if resizable)
			height       : 40,                // the height of the track when it is first created
			resizable    : true,              // allow the track to be vertically resized by the user
			showControls : false,             // show the track's controls when it is first created
			cls          : 'AJ_track',        // class name to apply to the div that contains the track
			iconCls      : 'silk_bricks',     // class name to use for the track's icon

			// Config options inherited from BrowserTrack
			enableMenu   : true,              // enable the custom right-click context menu
			autoResize   : false,             // automatically resize the track to fit its content
			autoScroll   : true,              // ???
			minCache     : 100,               // the minimum size that a cache is allowed to shrink to
			cache        : 3 * screen.width,  // number of pixels (width) to cache in the browser by default
			maxCache     : 20 * screen.width, // the maximum size that a cache is allowed to grow to
			scaler       : 0.5,               // default starting position of the scaler control (must be between 0.0 and 1.0)
			dragMode     : 'browse',          // default dragMode for the track

			// Config options inherited from DataTrack
			datasource    : '',               // URL to the track's data provider
			requestMethod : 'POST',           // HTTP request method to use
			requestParams : null,             // name : value pairs to send with all requests (object)			

			// Config options specific to ModelsTrack
			single        : false,            // show only one strand
			searchBox     : true,             // enable the lookup box
			searchURL     : self.config.data, // URL to the lookup box's data provider (defaults to the same URL as the track's data provider)
			clsAbove      : 'AJ_above',       // class name to apply to the div that contains the watson strand
			clsBelow      : 'AJ_below',       // class name to apply to the div that contains the crick strand
			slider        : 0.5,              // default starting position of the slider control (must be between 0.0 and 1.0)
			showLabels    : true,             // show labels for gene models
			showArrows    : true,             // show directional arrows for gene models
			labelPos      : 'left',           // set the position of the label (left, top, right, bottom)
			boxHeight     : 10,               // default box height for the models
			boxHeightMax  : 24,               // maximum box height for the models (height is modified when dragging in 'scale' mode)
			boxHeightMin  : 1,                // minimum box height for the models
			boxBlingLimit : 6                 // minimum height at which labels and arrows will be shown
		};
	

Zoom Categories

The ModelsTrack plugin only uses has two zoom policies, 'normal' and 'large'. A complete reload event will be triggered when a change to zoom level results in a category change. The sole purpose of the 'large' category is to preserve bandwidth at a level where the majority of gene model components could not possibly be visible.

		//Zoom policies
		var policies = [
			
			//Normal (loads gene models with components)
			{
				index  : 0,
				min    : 0,
				max    : 1000/1,
				bases  : 1,
				pixels : 1,
				cache  : 1000000
			},
			
			//Large (loads gene models without components)
			{
				index  : 1,
				min    : 1000/1,
				max    : 100000/1,
				bases  : 1000,
				pixels : 1,
				cache  : 10000000
			}
		];
	

Requests & Responses

ZC* Request Response Description
All AD.SyndicationRequest AD.SyndicationResponse Syndicate the data service that provides data for this track
All AD.RangeRequest AD.Models Gene model sub-components are only downloaded if visible
All AD.TextSearchRequest AD.ModelsLookupResponse Provides a list of models that result from a text search
* ZC = Zoom Category
* AD = AnnoJ.Datatypes

Code

License: Creative commons (some rights reserved)
Source: minified.js | full.js
* Please report bugs to the most recently listed engineer
VersionEngineer(s)Message
2008-May-27tontij01(at)student.uwa.edu.auFirst formal release with Anno-J v1.0