Class Index | File Index


Class Biojs.Tree

Version 1.0.0.

Extends Biojs.

Defined in: Biojs.Tree.js.

Class Summary
Constructor Attributes Constructor Name and Description
Tree component
Field Summary
Field Attributes Field Name and Description
Array containing the supported event names
Default values for the options
Method Summary
Method Attributes Method Name and Description
Methods borrowed from class Biojs:
addListener, extend, getId, listen, raiseEvent, removeListener, setEventHandlers, setOptions
Class Detail
Tree component
Author: Fabian Schreiber.
			var alignment_file = "../biojs/data/tree/just_sequences.json";
			var domain_file = "../biojs/data/tree/just_domains.TF105041.json";
			var model_json_tree = "../biojs/data/tree/TF105041_model.json";

			var image_path = "../biojs/data/tree/images/species_files/";
			//var highlight_gene = "ENSBTAP00000001311";
			var highlight_gene = "";
			//var newick_tree = "../data/trees/newick_tree.nh";
			var newick_tree = "";
			var load_from_variable = 0;
		    var json_tree_string;

myTree = new Biojs.Tree({
			        target : "YourOwnDivId",
					formatOptions : {
					// tree parameters
				    json_tree : model_json_tree, 
					alignment_file : alignment_file,
					show_real_branchlength : "false",
					annotation_option : "seq_domains",
					domains_file : domain_file,
				    two_window : true,
				    image_path : image_path,
				    highlight_gene : highlight_gene,
				    json_tree_string : json_tree_string,
				    load_from_variable : load_from_variable,
{Object} options
An object with the options for Tree component.
Options detailed:
{string} target
Identifier of the DIV tag where the component should be displayed.
{file} tree
JSON that contains the tree information.
   	{ name: <name>, 
		  display_label: <display_label>,
		  duplication: <duplication>,
		  branch_length: <endVal1>,
		  common_name: <common_name>,
		  seq_length: <seq_length>,
		  type: <type>,
		  uniprot_name: <uniprot_name>,

		  children: []},
   	// Any others nodes
tree : [
		{"name":"Amniota_1","branch_length":"0.2212","binary_alignment":"N/A","children": [..]
{file} domains_file
Set of annotations for the leaves of the tree. Must be an array of objects following the syntax:
             // An annotation:
             { name: <name>, 
               species_name: <message>, 
               alignment_length: <message>, 
               seq_length: <message>, 
               cigar_string: <color_code>, 
               domains: [{ name: name; domain_start: <startVal1>, domain_end: <endVal1> id: <HTMLColor> name : name}, ...,{ start: <startValN>, end: <endValN>, color: <HTMLColor>}] 
             // ...
             // more annotations here 
             // ...
tree : [
       "cigar_string" : "4D22MD23M3D10MD13M2D44M2D23M3D7MD13M11D16MD57M5D27MD26M2D3M9D8MD9M2D3MD12MD11M2D10M3D3MD2MDMD9MD19M4D2MD17MD10MD24M5D7MD3MD24MD19MD10M3D6M10D26M6D5M2D17M12D11M2D10M2D52M2D7M2D12MD7M5D22M2D4M2D10M3D46MD20MD6M4D4M2D3M3DM2D11M4D4MDM2D4MDMD3MD5M4D5MD9M5D5M2DM7D18M3D5MD2MD6MD21MD5MDM2D6MDMD2MD23MD9M5D19M7D3M2D19MD2MD7M7D14M5D13MD9MD7M3D45MD7M2D4M3D7M8D3M13D2M12D3M5D4MD35MD44M3D2M2D18M15D17MD18M8D4M8DMD21MD36MD17MD2MD25M2D19MD6MD2MD3MD12M6D12MD21M4D11MD17MD18M2D79MD55M2D18M2D30M4D5MD5MD8MD11MD23MD42M8D26M4DMD25MD6M5D7M2D6M2D3MD15M6DMD14MD32M10D3MD6M5D43M3D13MD21MD6MD6M3D3MD8MD10M7D11M4D23M10D44MD12M5D4MDM3D19M13D34MD4MD15MD2MD6MD53M4D2MD10MD38MD13MD25MD104M3D62M2D15M5D5M6D37M2D6MDMD234MD3MD162MD11M2D30M2D45MD20MD2MD100M13D25M4D20M4D78M8D62MD38MD2MD8MD3MD4MD5MD41MD3MD4M16D11M2DM3D38M2D",
    "species_name" : "Ailuropoda_melanoleuca",
    "alignment_length" : 4010,
    "domains" : [ ..]
    "seq_length" : 3460,
    "name" : "ENSAMEP00000009909"}
  • name is the unique name corresponding to an id in the tree
  • species_name the species the annotation belong to.
  • alignment_length the length of the alignment sequence
  • seq_length the length of the sequence
  • domains array of objects defining the intervals which belongs to the annotation.
  • domains[i].domain_start domain's start position
  • domains[i].domain_end domain's stop position.
  • domains[i].name name of the domain, e.g. BRCA-2_OB1
  • .
  • domains[i].id the domain's id in the source database. Here, e.g. PF09103.5
  • domains[i].evalue the domains evalue
{string} image_path
Path to directory which contains species images.
{string} [annotation_option="seqDomains"]
The display format for the annotations.
{boolean} [two_windows]
specifies whether the tree and the annotations should be printed into the same div/svg or separate
{string} [highlight_gene]
Gene identifier to be highlighted.
jQuery Core 1.9.2
jQuery Tipsy
Additional tree functions
BioJS Tree css
jQuery Tipsy
Field Detail
<inner> eventTypes
Array containing the supported event names

<inner> opt
Default values for the options
Method Detail

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