Class Index | File Index

Classes


Class Biojs.Chromosome


Version 1.0.1.

Extends Biojs.

Defined in: Biojs.Chromosome.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Biojs.Chromosome(options)
This component allow to visualize a chromosome and its bands.
Field Summary
Field Attributes Field Name and Description
<inner>  
Array containing the supported event names
<inner>  
opt
Default values for the options
Method Summary
Method Attributes Method Name and Description
 
constructor(options)
 
Move the Selector to a specific place in the chromosome
Methods borrowed from class Biojs:
addListener, extend, getId, listen, raiseEvent, removeListener, setEventHandlers, setOptions
Event Summary
Event Attributes Event Name and Description
 
onBandSelection(actionPerformed)
 
onDASLoadFail(actionPerformed)
 
onModelLoaded(actionPerformed)
 
onSelectorChanged(actionPerformed)
Class Detail
Biojs.Chromosome(options)
This component allow to visualize a chromosome and its bands. The bands can be recovered from a DAS source or directly from a javascript model.
Author: Gustavo A. Salazar.
					var instance= new Biojs.Chromosome({
						target: "YourOwnDivId",
						dasSource: "http://www.ensembl.org/das/Homo_sapiens.NCBI36.karyotype/",
						dasSegment: "8"
					});
Parameters:
{Object} options
An object with the options for the Chromosome component.
Options detailed:
{string} target
Identifier of the DIV tag where the component should be displayed.
{string} dasSource
URL of the DAS source to obtain the band's information. For example Ensembl provides the human chromosome information as a DAS source in the URL http://www.ensembl.org/das/Homo_sapiens.NCBI36.karyotype/
{string} dasSegment
DAS segment to query, in case of chromosomes is the chromosome id (eg. 8). Optionally DAS sources can be queried for a spwcific region of the chromosome(eg. 8:43100000,49100001)
{Object} model
Alternatively to DAS, This component can receive directly a javascript object containing the relevant information. Here is an example of the object structure using JSON notation: { "id": "8", "start": 1, "stop": 199999, "bands": [ { "label": "p11", "type": "acen", "start": 1, "stop": "100000" }, { "label": "q11", "type": "gpos75", "start": 100001, "stop": "199999" } ] }
{boolean} [includeSelector]
Include an area selector that interacts with the coordinate position of the chromosome. default true.
Requires:
jQuery Core 1.7.2
jsdas 0.1.6
Chromosome CSS
Biojs AreaSelector
jQuery UI 1.8.2
jQuery UI CSS 1.8.2
jquery.watcher.js
Selector CSS
Field Detail
<inner> eventTypes
Array containing the supported event names

<inner> opt
Default values for the options
Method Detail
constructor(options)
Parameters:
options

moveSelectorToCoordinates(from, to)
Move the Selector to a specific place in the chromosome
instance.moveSelectorToCoordinates(10000000,20000000);
Parameters:
{integer} from
initial chromosome coordinate to locate the selector
{integer} to
final chromosome coordinate to locate the selector
Event Detail
onBandSelection(actionPerformed)
					instance.onBandSelection(function( objEvent ) {
						alert("The band " + objEvent.band_id + " of the chromosome " + objEvent.chromosome_id + " has been selected\n[" + objEvent.band_start + "," + objEvent.band_stop + "]");
					});
Parameters:
{function} actionPerformed
A function which receives an Biojs.Event object as argument.
Event object data:
{Object} source
The component which did triggered the event.
{string} type
The name of the event.
{string} chromosome_id
Id of the chromosome that the selected band belongs.
{string} band_id
Id of the band that has been selected.
{integer} band_start
Coordinate of the first nucleotide of the selected band
{integer} band_stop
Coordinate of the last nucleotide of the selected band
{string} band_type
type of the band selected (eg. acen, gpos50, gneg).

onDASLoadFail(actionPerformed)
					instance.onDASLoadFail(function( objEvent ) {
						alert("The DAS source "+objEvent.dasSource+" with information of the segment "+objEvent.dasSegment+" couldn't be loaded");
					});
Parameters:
{function} actionPerformed
A function which receives an Biojs.Event object as argument. Triggered when the model couldn't be loaded
Event object data:
{Object} source
The component which did triggered the event.
{string} type
The name of the event.
{string} dasSource
URL of the DAS source queried
{string} dasSegment
URL of the DAS source queried

onModelLoaded(actionPerformed)
					instance.onModelLoaded(function( objEvent ) {
						alert("The model for the chromosome "+objEvent.model.id+" has been loaded");
					});
Parameters:
{function} actionPerformed
A function which receives an Biojs.Event object as argument. Triggered when he model has been loaded
Event object data:
{Object} source
The component which did triggered the event.
{string} type
The name of the event.
{Object} model
The model after been displayed

onSelectorChanged(actionPerformed)
					instance.onSelectorChanged(function( objEvent ) {
						alert("The selector has move to the region \n[" + objEvent.selector_start + "," + objEvent.selector_stop + "]");
					});
Parameters:
{function} actionPerformed
A function which receives an Biojs.Event object as argument. Is triggered when the the coordinates of the selector have been changed.
Event object data:
{Object} source
The component which did triggered the event.
{string} type
The name of the event.
{string} chromosome_id
Id of the chromosome that the selected band belongs.
{integer} selector_start
Coordinate of the left side of the selector
{integer} selector_stop
Coordinate of the right side of the selector

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Apr 17 2014 17:42:41 GMT+0100 (BST)