galaxy-commits
Threads by month
- ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions

galaxy-dist commit 5f9d6d9582e5: Read zipfiles in chunks when uncompressing in the upload tool. And I continue to wish zipfile was a lot more like tarfile...
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1287608406 14400
# Node ID 5f9d6d9582e50f134c97e8523a015f210dd3af70
# Parent 7afd79d131e40f5f9a61125ec159552dc7c3fabd
Read zipfiles in chunks when uncompressing in the upload tool. And I continue to wish zipfile was a lot more like tarfile...
--- a/tools/data_source/upload.py
+++ b/tools/data_source/upload.py
@@ -258,6 +258,9 @@ def add_file( dataset, registry, json_fi
# See if we have a zip archive
is_zipped = check_zip( dataset.path )
if is_zipped:
+ CHUNK_SIZE = 2**20 # 1Mb
+ uncompressed = None
+ uncompressed_name = None
unzipped = False
z = zipfile.ZipFile( dataset.path )
for name in z.namelist():
@@ -267,18 +270,28 @@ def add_file( dataset, registry, json_fi
stdout = 'ZIP file contained more than one file, only the first file was added to Galaxy.'
break
fd, uncompressed = tempfile.mkstemp( prefix='data_id_%s_upload_zip_' % dataset.dataset_id, dir=os.path.dirname( dataset.path ), text=False )
- try:
- outfile = open( uncompressed, 'wb' )
- outfile.write( z.read( name ) )
- outfile.close()
- shutil.move( uncompressed, dataset.path )
- dataset.name = name
- unzipped = True
- except IOError:
- os.close( fd )
- os.remove( uncompressed )
- file_err( 'Problem decompressing zipped data', dataset, json_file )
- return
+ zipped_file = z.open( name )
+ while 1:
+ try:
+ chunk = zipped_file.read( CHUNK_SIZE )
+ except IOError:
+ os.close( fd )
+ os.remove( uncompressed )
+ file_err( 'Problem decompressing zipped data', dataset, json_file )
+ return
+ if not chunk:
+ break
+ os.write( fd, chunk )
+ os.close( fd )
+ zipped_file.close()
+ uncompressed_name = name
+ unzipped = True
+ z.close()
+ # Replace the zipped file with the decompressed file
+ if uncompressed is not None:
+ shutil.move( uncompressed, dataset.path )
+ dataset.name = uncompressed_name
+ data_type = 'zip'
if not data_type:
if check_binary( dataset.path ):
# We have a binary dataset, but it is not Bam, Sff or Pdf
1
0

galaxy-dist commit c375c4a8e4e4: Fix more unicode issues when listing and running workflows.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1287605437 14400
# Node ID c375c4a8e4e42e5e29e996f3472aacdbdc3d22e0
# Parent 647ca0049221bcadde31559d6a99a6ccf236d134
Fix more unicode issues when listing and running workflows.
--- a/templates/workflow/list_for_run.mako
+++ b/templates/workflow/list_for_run.mako
@@ -36,7 +36,7 @@
%for i, workflow in enumerate( workflows ):
<tr><td>
- <a href="${h.url_for( action='run', id=trans.security.encode_id(workflow.id) )}">${workflow.name}</a>
+ <a href="${h.url_for( action='run', id=trans.security.encode_id(workflow.id) )}">${h.to_unicode( workflow.name )}</a><a id="wf-${i}-popup" class="popup-arrow" style="display: none;">▼</a></td><td>${len(workflow.latest_workflow.steps)}</td>
--- a/templates/workflow/run.mako
+++ b/templates/workflow/run.mako
@@ -119,7 +119,7 @@ from galaxy.jobs.actions.post import Act
</div></%def>
-<h2>Running workflow "${workflow.name}"</h2>
+<h2>Running workflow "${h.to_unicode( workflow.name )}"</h2>
%if has_upgrade_messages:
<div class="warningmessage">
@@ -130,7 +130,7 @@ from galaxy.jobs.actions.post import Act
%endif
<form id="tool_form" name="tool_form" method="POST">
-## <input type="hidden" name="workflow_name" value="${workflow.name | h}" />
+## <input type="hidden" name="workflow_name" value="${h.to_unicode( workflow.name ) | h}" />
%for i, step in enumerate( steps ):
%if step.type == 'tool' or step.type is None:
<% tool = app.toolbox.tools_by_id[step.tool_id] %>
@@ -153,7 +153,7 @@ from galaxy.jobs.actions.post import Act
% if step.annotations:
<hr/><div class='form-row'>
- <label>Annotation:</label> ${step.annotations[0].annotation}
+ <label>Annotation:</label> ${h.to_unicode( step.annotations[0].annotation )}
</div>
% endif
</div>
1
0

galaxy-dist commit 423e72ab1990: trackster: Don't index bottom level for summary_tree, greatly reducing computation time (>5x speedup) while not sacrificing usability
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1287612031 14400
# Node ID 423e72ab19901de8dc8f5e4e2d2e7524921380bc
# Parent 5f9d6d9582e50f134c97e8523a015f210dd3af70
trackster: Don't index bottom level for summary_tree, greatly reducing computation time (>5x speedup) while not sacrificing usability
--- a/lib/galaxy/visualization/tracks/summary.py
+++ b/lib/galaxy/visualization/tracks/summary.py
@@ -1,12 +1,15 @@
'''
2010, Kanwei Li
Summary tree data structure for aggregation
+
+10/20/2010: Changed version to 2 as we no longer look at bottom level, for better performance
'''
import sys, os
import cPickle
-VERSION = 1
+VERSION = 2
+MIN_LEVEL = 2
class SummaryTree:
def __init__(self, block_size, levels, draw_cutoff, detail_cutoff):
@@ -27,11 +30,11 @@ class SummaryTree:
else:
blocks = self.chrom_blocks[chrom] = {}
self.chrom_stats[chrom] = {}
- for level in range(1, self.levels+1):
+ for level in range(MIN_LEVEL, self.levels+1):
blocks[level] = {}
- for level in range(1, self.levels+1):
+ for level in range(MIN_LEVEL, self.levels+1):
block_level = blocks[level]
starting_block = self.find_block(start, level)
ending_block = self.find_block(end, level)
@@ -45,7 +48,7 @@ class SummaryTree:
''' Checks for cutoff and only stores levels above it '''
for chrom, blocks in self.chrom_blocks.iteritems():
cur_best = 999
- for level in range(self.levels, 0, -1):
+ for level in range(self.levels, MIN_LEVEL-1, -1):
max_val = max(blocks[level].values())
if max_val < self.draw_cutoff:
if "draw_level" not in self.chrom_stats[chrom]:
1
0

galaxy-dist commit 7afd79d131e4: Do not preserve table borders in Pages.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1287607913 14400
# Node ID 7afd79d131e40f5f9a61125ec159552dc7c3fabd
# Parent c375c4a8e4e42e5e29e996f3472aacdbdc3d22e0
Do not preserve table borders in Pages.
--- a/templates/page/display.mako
+++ b/templates/page/display.mako
@@ -97,7 +97,6 @@
padding: 8px 5px 5px;
min-width: 500px;
border: none;
- border-collapse: separate;
}
.page-body caption {
text-align: left;
1
0

galaxy-dist commit 151d007da2f4: Stop redirecting output of the taxonomy2tree tool, since the binary has been updated to stop writing info messages to stderr.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1287681255 14400
# Node ID 151d007da2f4709ba546cd5cc76738e28b64e05d
# Parent 8cc9544dd81d6c53e7c79a24b5fb30f58854e45b
Stop redirecting output of the taxonomy2tree tool, since the binary has been updated to stop writing info messages to stderr.
--- a/tools/taxonomy/t2t_report.xml
+++ b/tools/taxonomy/t2t_report.xml
@@ -3,7 +3,7 @@
<requirements><requirement type="package">taxonomy</requirement></requirements>
- <command>taxonomy2tree $input 0 /dev/null $out_file1 0 &> /dev/null</command>
+ <command>taxonomy2tree $input 0 /dev/null $out_file1 0</command><inputs><param format="taxonomy" name="input" type="data" label="Summarize taxonomic representation for"/></inputs>
1
0

galaxy-dist commit b3763f7ecec7: added more zoom levels for mutation viz tool
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1287603271 14400
# Node ID b3763f7ecec7082e76a5ff407091fa7f0bffb7df
# Parent e226033419a91100e657f6880562dc50ae01ef98
added more zoom levels for mutation viz tool
--- a/tools/mutation/visualize.xml
+++ b/tools/mutation/visualize.xml
@@ -30,6 +30,11 @@
<option value="3">3x</option><option value="4">4x</option><option value="5">5x</option>
+ <option value="6">6x</option>
+ <option value="7">7x</option>
+ <option value="8">8x</option>
+ <option value="9">9x</option>
+ <option value="10">10x</option><option value="interactive">Interactive</option></param>
--- a/tools/mutation/visualize.py
+++ b/tools/mutation/visualize.py
@@ -263,8 +263,8 @@ def mainsvg(opts, args):
# display legend
for i, b in enumerate( bases ):
bt = svg.SVG("tspan", b, style="font-family:Verdana;font-size:20%")
- s.append(svg.SVG("text", bt, x=12+(i*10), y=4, stroke="none", fill="black"))
- s.append(svg.SVG("rect", x=14+(i*10), y=1, width=4, height=3,
+ s.append(svg.SVG("text", bt, x=12+(i*10), y=3, stroke="none", fill="black"))
+ s.append(svg.SVG("rect", x=14+(i*10), y=0, width=4, height=3,
stroke="none", fill=colors[b], fill_opacity=0.5))
reader = open(opts.input_file, 'U')
1
0

galaxy-dist commit 9d9f0de20f4f: Make default initial value for Integer and Float parameters None.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1287683139 14400
# Node ID 9d9f0de20f4f9da28d53be38411b1ee1075201a1
# Parent 151d007da2f4709ba546cd5cc76738e28b64e05d
Make default initial value for Integer and Float parameters None.
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -212,7 +212,7 @@ class IntegerToolParameter( TextToolPara
if self.value:
return int( self.value )
else:
- return 0
+ return None
class FloatToolParameter( TextToolParameter ):
"""
@@ -254,7 +254,7 @@ class FloatToolParameter( TextToolParame
try:
return float( self.value )
except:
- return float( 0 )
+ return None
class BooleanToolParameter( ToolParameter ):
"""
1
0

galaxy-dist commit e226033419a9: Update version numbers of Tophat and Cufflinks wrappers to reflect current tool installations on Galaxy main and test instances.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1287602818 14400
# Node ID e226033419a91100e657f6880562dc50ae01ef98
# Parent 73c4c66ff3dd8101a0e6126077f4f8fc897c71fe
Update version numbers of Tophat and Cufflinks wrappers to reflect current tool installations on Galaxy main and test instances.
--- a/tools/ngs_rna/cuffcompare_wrapper.xml
+++ b/tools/ngs_rna/cuffcompare_wrapper.xml
@@ -1,4 +1,4 @@
-<tool id="cuffcompare" name="Cuffcompare" version="0.8.3">
+<tool id="cuffcompare" name="Cuffcompare" version="0.9.1"><description>compare assembled transcripts to a reference annotation and track Cufflinks transcripts across multiple experiments</description><requirements><requirement type="package">cufflinks</requirement>
--- a/tools/ngs_rna/cuffdiff_wrapper.xml
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml
@@ -1,4 +1,4 @@
-<tool id="cuffdiff" name="Cuffdiff" version="0.8.3">
+<tool id="cuffdiff" name="Cuffdiff" version="0.9.1"><description>find significant changes in transcript expression, splicing, and promoter use</description><requirements><requirement type="package">cufflinks</requirement>
--- a/tools/ngs_rna/cufflinks_wrapper.xml
+++ b/tools/ngs_rna/cufflinks_wrapper.xml
@@ -1,4 +1,4 @@
-<tool id="cufflinks" name="Cufflinks" version="0.8.3">
+<tool id="cufflinks" name="Cufflinks" version="0.9.1"><description>transcript assembly and FPKM (RPKM) estimates for RNA-Seq data</description><requirements><requirement type="package">cufflinks</requirement>
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -1,4 +1,4 @@
-<tool id="tophat" name="Tophat" version="1.0.14">
+<tool id="tophat" name="Tophat" version="1.1.1"><description>Find splice junctions using RNA-seq data</description><requirements><requirement type="package">tophat</requirement>
1
0

galaxy-dist commit 6372b67c9e37: mutation viz tool test data files
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1287517282 14400
# Node ID 6372b67c9e370b3a80159bcc719e13d50ddc018f
# Parent e029c860e71710d69f725e5c136b7e55fa529a42
mutation viz tool test data files
--- /dev/null
+++ b/test-data/mutation_data1_zoom3x.svg
@@ -0,0 +1,639 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg style="stroke-linejoin:round; stroke:black; stroke-width:0.5pt; text-anchor:middle; fill:none" xmlns="http://www.w3.org/2000/svg" font-family="Helvetica, Arial, FreeSans, Sans, sans, sans-serif" height="1980px" width="208px" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 116 496">
+
+<g id="viewport">
+
+<text y="4" x="12" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">A</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="14" fill="blue" />
+
+<text y="4" x="22" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">C</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="24" fill="green" />
+
+<text y="4" x="32" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">G</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="34" fill="orange" />
+
+<text y="4" x="42" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">T</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="44" fill="red" />
+
+<text y="25" x="23" stroke="none" transform="rotate(-90 23,25)" fill="black"><tspan style="font-family:Verdana;font-size:25%">s1</tspan></text>
+
+<text y="42" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">72</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="38" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="38" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="38" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="39.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="41.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="42.5" x="16" fill="red" />
+
+<text y="50" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">149</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="46" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="46" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="46" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="47.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="49.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="50.5" x="16" fill="red" />
+
+<text y="58" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">194</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="54" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="54" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="54" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="55.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="57.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="58.5" x="16" fill="red" />
+
+<text y="66" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">299</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="62" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="62" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="62" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="63.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="65.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="66.5" x="16" fill="red" />
+
+<text y="74" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">309</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="70" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="70" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="70" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="11" stroke="none" y="71.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="73.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="2" stroke="none" y="74.5" x="16" fill="red" />
+
+<text y="82" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">310</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="78" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="78" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="78" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="4" stroke="none" y="79.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="81.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="9" stroke="none" y="82.5" x="16" fill="red" />
+
+<text y="90" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">409</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="86" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="86" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="86" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="87.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="89.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="90.5" x="16" fill="red" />
+
+<text y="98" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2353</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="94" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="94" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="94" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="95.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="97.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="98.5" x="16" fill="red" />
+
+<text y="106" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2484</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="102" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="102" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="102" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="103.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="105.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="106.5" x="16" fill="red" />
+
+<text y="114" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2707</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="110" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="110" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="110" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="111.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="113.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="114.5" x="16" fill="red" />
+
+<text y="122" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3011</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="118" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="118" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="118" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="119.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="121.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="122.5" x="16" fill="red" />
+
+<text y="130" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3434</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="126" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="126" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="126" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="127.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="129.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="130.5" x="16" fill="red" />
+
+<text y="138" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3480</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="134" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="134" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="134" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="135.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="137.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="138.5" x="16" fill="red" />
+
+<text y="146" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">5063</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="142" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="142" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="142" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="143.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="145.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="146.5" x="16" fill="red" />
+
+<text y="154" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">5580</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="150" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="150" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="150" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="151.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="153.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="154.5" x="16" fill="red" />
+
+<text y="162" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">7028</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="158" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="158" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="158" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="159.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="161.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="162.5" x="16" fill="red" />
+
+<text y="170" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">8701</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="166" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="166" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="166" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="167.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="169.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="170.5" x="16" fill="red" />
+
+<text y="178" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">8992</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="174" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="174" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="174" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="8" stroke="none" y="175.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="177.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="5" stroke="none" y="178.5" x="16" fill="red" />
+
+<text y="186" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">9377</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="182" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="182" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="182" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="183.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="185.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="186.5" x="16" fill="red" />
+
+<text y="194" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">9540</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="190" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="190" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="190" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="191.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="193.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="194.5" x="16" fill="red" />
+
+<text y="202" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10398</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="198" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="198" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="198" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="199.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="201.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="202.5" x="16" fill="red" />
+
+<text y="210" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10550</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="206" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="206" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="206" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="207.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="209.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="210.5" x="16" fill="red" />
+
+<text y="218" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10819</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="214" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="214" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="214" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="215.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="217.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="218.5" x="16" fill="red" />
+
+<text y="226" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10873</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="222" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="222" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="222" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="223.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="225.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="226.5" x="16" fill="red" />
+
+<text y="234" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11017</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="230" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="230" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="230" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="231.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="233.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="234.5" x="16" fill="red" />
+
+<text y="242" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11299</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="238" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="238" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="238" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="239.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="241.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="242.5" x="16" fill="red" />
+
+<text y="250" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11719</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="246" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="246" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="246" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="247.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="249.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="250.5" x="16" fill="red" />
+
+<text y="258" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11722</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="254" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="254" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="254" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="255.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="257.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="258.5" x="16" fill="red" />
+
+<text y="266" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">12705</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="262" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="262" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="262" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="263.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="265.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="266.5" x="16" fill="red" />
+
+<text y="274" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">12850</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="270" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="270" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="270" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="271.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="273.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="274.5" x="16" fill="red" />
+
+<text y="282" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14053</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="278" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="278" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="278" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="279.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="281.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="282.5" x="16" fill="red" />
+
+<text y="290" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14212</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="286" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="286" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="286" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="287.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="289.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="290.5" x="16" fill="red" />
+
+<text y="298" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14580</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="294" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="294" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="294" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="295.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="297.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="298.5" x="16" fill="red" />
+
+<text y="306" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14766</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="302" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="302" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="302" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="303.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="305.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="306.5" x="16" fill="red" />
+
+<text y="314" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14905</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="310" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="310" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="310" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="311.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="313.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="314.5" x="16" fill="red" />
+
+<text y="322" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">15301</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="318" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="318" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="318" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="319.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="321.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="322.5" x="16" fill="red" />
+
+<text y="330" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">15932</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="326" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="326" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="326" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="327.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="329.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="330.5" x="16" fill="red" />
+
+<text y="338" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16172</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="334" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="334" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="334" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="335.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="337.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="338.5" x="16" fill="red" />
+
+<text y="346" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16183</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="342" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="342" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="342" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="343.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="345.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="346.5" x="16" fill="red" />
+
+<text y="354" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16184</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="350" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="350" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="350" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="351.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="353.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="354.5" x="16" fill="red" />
+
+<text y="362" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16189</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="358" x="0" fill="green" />
+
+<text y="370" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16190</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="366" x="0" fill="green" />
+
+<text y="378" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16224</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="374" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="374" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="374" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="375.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="377.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="378.5" x="16" fill="red" />
+
+<text y="386" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16240</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="382" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="382" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="382" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="383.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="385.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="386.5" x="16" fill="red" />
+
+<text y="394" x="7" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16321</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="390" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="390" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="390" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="391.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="393.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="394.5" x="16" fill="red" />
+
+</g>
+
+</svg>
+
--- /dev/null
+++ b/test-data/mutation_data1_interactive.svg
@@ -0,0 +1,868 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
+<script type="text/javascript">
+/**
+ * SVGPan library 1.2
+ * ====================
+ *
+ * Given an unique existing element with id "viewport", including the
+ * the library into any SVG adds the following capabilities:
+ *
+ * - Mouse panning
+ * - Mouse zooming (using the wheel)
+ * - Object dargging
+ *
+ * Known issues:
+ *
+ * - Zooming (while panning) on Safari has still some issues
+ *
+ * Releases:
+ *
+ * 1.2, Sat Mar 20 08:42:50 GMT 2010, Zeng Xiaohui
+ * Fixed a bug with browser mouse handler interaction
+ *
+ * 1.1, Wed Feb 3 17:39:33 GMT 2010, Zeng Xiaohui
+ * Updated the zoom code to support the mouse wheel on Safari/Chrome
+ *
+ * 1.0, Andrea Leofreddi
+ * First release
+ *
+ * This code is licensed under the following BSD license:
+ *
+ * Copyright 2009-2010 Andrea Leofreddi (a.leofreddi(a)itcharm.com) All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Andrea Leofreddi ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Andrea Leofreddi OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of Andrea Leofreddi.
+ */
+
+var root = document.documentElement;
+
+var state = 'none', stateTarget, stateOrigin, stateTf;
+
+setupHandlers(root);
+
+/**
+ * Register handlers
+ */
+function setupHandlers(root){
+ setAttributes(root, {
+ "onmouseup" : "add(evt)",
+ "onmousedown" : "handleMouseDown(evt)",
+ "onmousemove" : "handleMouseMove(evt)",
+ "onmouseup" : "handleMouseUp(evt)",
+ //"onmouseout" : "handleMouseUp(evt)", // Decomment this to stop the pan functionality when dragging out of the SVG element
+ });
+
+ if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0)
+ window.addEventListener('mousewheel', handleMouseWheel, false); // Chrome/Safari
+ else
+ window.addEventListener('DOMMouseScroll', handleMouseWheel, false); // Others
+}
+
+/**
+ * Instance an SVGPoint object with given event coordinates.
+ */
+function getEventPoint(evt) {
+ var p = root.createSVGPoint();
+
+ p.x = evt.clientX;
+ p.y = evt.clientY;
+
+ return p;
+}
+
+/**
+ * Sets the current transform matrix of an element.
+ */
+function setCTM(element, matrix) {
+ var s = "matrix(" + matrix.a + "," + matrix.b + "," + matrix.c + "," + matrix.d + "," + matrix.e + "," + matrix.f + ")";
+
+ element.setAttribute("transform", s);
+}
+
+/**
+ * Dumps a matrix to a string (useful for debug).
+ */
+function dumpMatrix(matrix) {
+ var s = "[ " + matrix.a + ", " + matrix.c + ", " + matrix.e + "\n " + matrix.b + ", " + matrix.d + ", " + matrix.f + "\n 0, 0, 1 ]";
+
+ return s;
+}
+
+/**
+ * Sets attributes of an element.
+ */
+function setAttributes(element, attributes){
+ for (i in attributes)
+ element.setAttributeNS(null, i, attributes[i]);
+}
+
+/**
+ * Handle mouse move event.
+ */
+function handleMouseWheel(evt) {
+ if(evt.preventDefault)
+ evt.preventDefault();
+
+ evt.returnValue = false;
+
+ var svgDoc = evt.target.ownerDocument;
+
+ var delta;
+
+ if(evt.wheelDelta)
+ delta = evt.wheelDelta / 3600; // Chrome/Safari
+ else
+ delta = evt.detail / -90; // Mozilla
+
+ var z = 1 + delta; // Zoom factor: 0.9/1.1
+
+ var g = svgDoc.getElementById("viewport");
+
+ var p = getEventPoint(evt);
+
+ p = p.matrixTransform(g.getCTM().inverse());
+
+ // Compute new scale matrix in current mouse position
+ var k = root.createSVGMatrix().translate(p.x, p.y).scale(z).translate(-p.x, -p.y);
+
+ setCTM(g, g.getCTM().multiply(k));
+
+ stateTf = stateTf.multiply(k.inverse());
+}
+
+/**
+ * Handle mouse move event.
+ */
+function handleMouseMove(evt) {
+ if(evt.preventDefault)
+ evt.preventDefault();
+
+ evt.returnValue = false;
+
+ var svgDoc = evt.target.ownerDocument;
+
+ var g = svgDoc.getElementById("viewport");
+
+ if(state == 'pan') {
+ // Pan mode
+ var p = getEventPoint(evt).matrixTransform(stateTf);
+
+ setCTM(g, stateTf.inverse().translate(p.x - stateOrigin.x, p.y - stateOrigin.y));
+ } else if(state == 'move') {
+ // Move mode
+ var p = getEventPoint(evt).matrixTransform(g.getCTM().inverse());
+
+ setCTM(stateTarget, root.createSVGMatrix().translate(p.x - stateOrigin.x, p.y - stateOrigin.y).multiply(g.getCTM().inverse()).multiply(stateTarget.getCTM()));
+
+ stateOrigin = p;
+ }
+}
+
+/**
+ * Handle click event.
+ */
+function handleMouseDown(evt) {
+ if(evt.preventDefault)
+ evt.preventDefault();
+
+ evt.returnValue = false;
+
+ var svgDoc = evt.target.ownerDocument;
+
+ var g = svgDoc.getElementById("viewport");
+
+ if(evt.target.tagName == "svg") {
+ // Pan mode
+ state = 'pan';
+
+ stateTf = g.getCTM().inverse();
+
+ stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
+ }
+ /*else {
+ // Move mode
+ state = 'move';
+
+ stateTarget = evt.target;
+
+ stateTf = g.getCTM().inverse();
+
+ stateOrigin = getEventPoint(evt).matrixTransform(stateTf);
+ }*/
+}
+/**
+ * Handle mouse button release event.
+ */
+function handleMouseUp(evt) {
+ if(evt.preventDefault)
+ evt.preventDefault();
+
+ evt.returnValue = false;
+
+ var svgDoc = evt.target.ownerDocument;
+
+ if(state == 'pan' || state == 'move') {
+ // Quit pan mode
+ state = '';
+ }
+}
+</script>
+
+<g id="viewport">
+
+<text y="4" x="12" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">A</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="14" fill="blue" />
+
+<text y="4" x="22" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">C</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="24" fill="green" />
+
+<text y="4" x="32" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">G</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="34" fill="orange" />
+
+<text y="4" x="42" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:20%">T</tspan></text>
+
+<rect fill-opacity="0.5" height="3" width="4" stroke="none" y="1" x="44" fill="red" />
+
+<text y="35" x="23" stroke="none" transform="rotate(-90 23,35)" fill="black"><tspan style="font-family:Verdana;font-size:25%">s1</tspan></text>
+
+<text y="42" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">72</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="38" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="38" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="38" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="39.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="41.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="42.5" x="16" fill="red" />
+
+<text y="50" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">149</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="46" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="46" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="46" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="47.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="49.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="50.5" x="16" fill="red" />
+
+<text y="58" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">194</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="54" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="54" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="54" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="55.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="57.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="58.5" x="16" fill="red" />
+
+<text y="66" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">299</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="62" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="62" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="62" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="63.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="65.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="66.5" x="16" fill="red" />
+
+<text y="74" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">309</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="70" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="70" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="70" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="11" stroke="none" y="71.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="73.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="2" stroke="none" y="74.5" x="16" fill="red" />
+
+<text y="82" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">310</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="78" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="78" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="78" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="4" stroke="none" y="79.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="81.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="9" stroke="none" y="82.5" x="16" fill="red" />
+
+<text y="90" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">409</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="86" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="86" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="86" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="87.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="89.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="90.5" x="16" fill="red" />
+
+<text y="98" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2353</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="94" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="94" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="94" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="95.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="97.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="98.5" x="16" fill="red" />
+
+<text y="106" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2484</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="102" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="102" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="102" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="103.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="105.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="106.5" x="16" fill="red" />
+
+<text y="114" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">2707</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="110" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="110" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="110" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="111.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="113.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="114.5" x="16" fill="red" />
+
+<text y="122" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3011</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="118" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="118" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="118" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="119.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="121.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="122.5" x="16" fill="red" />
+
+<text y="130" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3434</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="126" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="126" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="126" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="127.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="129.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="130.5" x="16" fill="red" />
+
+<text y="138" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">3480</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="134" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="134" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="134" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="135.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="137.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="138.5" x="16" fill="red" />
+
+<text y="146" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">5063</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="142" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="142" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="142" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="143.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="145.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="146.5" x="16" fill="red" />
+
+<text y="154" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">5580</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="150" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="150" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="150" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="151.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="153.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="154.5" x="16" fill="red" />
+
+<text y="162" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">7028</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="158" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="158" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="158" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="159.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="161.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="162.5" x="16" fill="red" />
+
+<text y="170" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">8701</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="166" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="166" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="166" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="167.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="169.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="170.5" x="16" fill="red" />
+
+<text y="178" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">8992</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="174" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="174" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="174" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="8" stroke="none" y="175.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="177.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="5" stroke="none" y="178.5" x="16" fill="red" />
+
+<text y="186" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">9377</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="182" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="182" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="182" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="183.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="185.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="186.5" x="16" fill="red" />
+
+<text y="194" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">9540</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="190" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="190" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="190" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="191.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="193.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="194.5" x="16" fill="red" />
+
+<text y="202" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10398</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="198" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="198" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="198" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="199.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="201.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="202.5" x="16" fill="red" />
+
+<text y="210" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10550</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="206" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="206" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="206" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="207.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="209.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="210.5" x="16" fill="red" />
+
+<text y="218" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10819</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="214" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="214" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="214" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="215.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="217.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="218.5" x="16" fill="red" />
+
+<text y="226" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">10873</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="222" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="222" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="222" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="223.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="225.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="226.5" x="16" fill="red" />
+
+<text y="234" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11017</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="230" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="230" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="230" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="231.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="233.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="234.5" x="16" fill="red" />
+
+<text y="242" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11299</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="238" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="238" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="238" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="239.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="241.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="242.5" x="16" fill="red" />
+
+<text y="250" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11719</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="246" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="246" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="246" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="247.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="249.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="250.5" x="16" fill="red" />
+
+<text y="258" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">11722</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="254" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="254" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="254" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="255.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="257.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="258.5" x="16" fill="red" />
+
+<text y="266" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">12705</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="262" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="262" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="262" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="263.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="265.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="266.5" x="16" fill="red" />
+
+<text y="274" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">12850</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="270" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="270" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="270" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="271.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="273.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="274.5" x="16" fill="red" />
+
+<text y="282" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14053</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="278" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="278" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="278" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="279.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="281.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="282.5" x="16" fill="red" />
+
+<text y="290" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14212</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="286" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="286" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="286" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="287.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="289.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="290.5" x="16" fill="red" />
+
+<text y="298" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14580</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="294" x="0" fill="orange" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="294" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="294" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="295.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="297.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="298.5" x="16" fill="red" />
+
+<text y="306" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14766</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="302" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="302" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="302" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="303.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="305.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="306.5" x="16" fill="red" />
+
+<text y="314" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">14905</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="310" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="310" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="310" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="311.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="313.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="314.5" x="16" fill="red" />
+
+<text y="322" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">15301</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="318" x="0" fill="blue" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="318" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="318" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="319.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="321.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="322.5" x="16" fill="red" />
+
+<text y="330" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">15932</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="326" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="326" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="326" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="327.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="329.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="330.5" x="16" fill="red" />
+
+<text y="338" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16172</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="334" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="334" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="334" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="335.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="337.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="338.5" x="16" fill="red" />
+
+<text y="346" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16183</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="342" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="342" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="342" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="343.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="345.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="346.5" x="16" fill="red" />
+
+<text y="354" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16184</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="350" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="350" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="350" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="351.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="353.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="354.5" x="16" fill="red" />
+
+<text y="362" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16189</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="358" x="0" fill="green" />
+
+<text y="370" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16190</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="366" x="0" fill="green" />
+
+<text y="378" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16224</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="374" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="374" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="374" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="375.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="0" stroke="none" y="377.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="378.5" x="16" fill="red" />
+
+<text y="386" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16240</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="382" x="0" fill="green" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="382" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="382" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="383.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="385.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="386.5" x="16" fill="red" />
+
+<text y="394" x="0" stroke="none" fill="black"><tspan style="font-family:Verdana;font-size:25%">16321</tspan></text>
+
+<rect fill-opacity="0.2" height="6" width="14" stroke="none" y="390" x="0" fill="red" />
+
+<rect fill-opacity="0.25" height="6" width="12" stroke="none" y="390" x="16" fill="grey" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="390" x="16" fill="blue" />
+
+<rect fill-opacity="0.6" height="1.5" width="12" stroke="none" y="391.5" x="16" fill="green" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="393.0" x="16" fill="orange" />
+
+<rect fill-opacity="0.6" height="1.5" width="1" stroke="none" y="394.5" x="16" fill="red" />
+
+</g>
+
+</svg>
+
--- /dev/null
+++ b/test-data/mutation_data1.txt
@@ -0,0 +1,1 @@
+chrM 72 73 G 26394 4 49 0 26447 26398 1 23389 3 45 0 23437 23392 1 3133 0 5 0 3138 3133 1 4087 0 6 0 4093 4087 1 9544 0 18 0 9562 9544 1 14437 1 22 1 14461 14439 1 11325 0 3 1 11329 11326 1 3595 0 9 1 3605 3596 1 12029 0 14 0 12043 12029 1 10441 0 21 0 10462 10441 1
chrM 149 150 T 11 50422 2 96 50531 50435 1 4 45417 1 65 45487 45422 1 0 4050 0 2 4052 4050 1 0 4488 0 4 4492 4488 1 3 18713 0 22 18738 18716 1 7 26855 0 33 26895 26862 1 1 13677 1 6 13685 13679 1 0 4635 0 13 4648 4635 1 4 26401 3 44 26452 26408 1 5 19462 0 18 19485 19467 1
chrM 194 195 C 0 102 2 58672 58776 58674 1 1 191 0 52080 52272 52081 1 3 8 0 3709 3720 3712 1 3 7 1 4600 4611 4604 1 1 35 1 21266 21303 21268 1 4 73 1 30175 30253 30180 1 6 14 0 13695 13715 13701 1 1 7 0 4786 4794 4787 1 2 31 1 31363 31397 31366 1 1 29 3 21865 21898 21869 1
chrM 299 300 A 18619 88 12 0 18719 100 0 18153 84 5 0 18242 89 0 568 32 0 0 623 32 2 774 31 0 0 828 31 2 6658 22 1 0 6681 23 0 10589 37 5 0 10631 42 0 2288 85 1 0 2455 86 2 637 30 0 0 696 30 2 8133 41 2 0 8176 43 0 7327 26 5 0 7358 31 0
chrM 309 310 C 6 11340 0 1433 12779 1439 2 3 11229 0 1336 12568 1339 2 1 778 0 4 783 5 0 0 1065 0 3 1069 3 0 0 4297 0 464 4761 464 2 1 6162 1 765 6929 767 2 0 3075 0 6 3083 6 0 0 875 0 1 876 1 0 1 5064 0 644 5709 645 2 2 4468 0 582 5052 584 2
chrM 310 311 T 1 1362 0 3775 5138 1363 2 1 1389 1 4222 5613 1391 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 448 0 1636 2085 449 2 0 795 0 2176 2971 795 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 567 0 2128 2695 567 2 0 558 0 1397 1955 558 2
chrM 409 410 A 2 3 1 30151 30157 30155 1 2 13 3 30355 30373 30371 1 1 0 0 2752 2754 2752 1 1 1 0 2996 2998 2997 1 1 2 0 12262 12265 12264 1 4 8 1 16960 16973 16969 1 3 8 0 8837 8853 8845 1 0 0 0 2942 2942 2942 1 0 3 1 16259 16263 16263 1 1 3 0 11363 11367 11366 1
chrM 2353 2354 C 3 34 3 63620 63660 63626 1 4 15 1 58084 58104 58089 1 1 0 0 2981 2982 2982 1 0 3 0 4267 4271 4267 1 0 7 0 23235 23242 23235 1 5 12 0 35778 35795 35783 1 5 3 0 12254 12264 12259 1 3 1 0 3923 3928 3926 1 4 7 2 32378 32391 32384 1 2 6 0 24366 24374 24368 1
chrM 2484 2485 C 0 20 0 27765 27785 27765 1 2 29 0 24596 24627 24598 1 0 1 0 698 699 698 1 0 5 0 879 884 879 1 0 8 1 10159 10168 10160 1 2 23 1 16036 16062 16039 1 2 5 0 2555 2562 2557 1 0 3 0 761 764 761 1 0 4 2 12896 12902 12898 1 0 14 0 10916 10930 10916 1
chrM 2707 2708 g 27267 1 48 1 27317 27269 1 25550 1 42 1 25594 25552 1 2662 1 4 0 2667 2663 1 3230 0 1 0 3231 3230 1 10833 0 5 1 10839 10834 1 16605 0 24 2 16631 16607 1 9785 0 3 1 9791 9786 1 3116 0 6 1 3123 3117 1 13825 1 33 0 13859 13826 1 10957 0 14 0 10971 10957 1
chrM 3011 3012 G 75871 4 113 2 75990 75877 1 53124 4 84 4 53216 53132 1 8422 0 67 1 8491 8423 1 6613 2 7 0 6622 6615 1 22042 1 37 2 22082 22045 1 28451 4 43 4 28502 28459 1 18438 2 12 12 18464 18452 1 9704 1 10 2 9718 9707 1 37763 2 132 2 37899 37767 1 33885 3 62 3 33953 33891 1
chrM 3434 3435 A 38932 0 22 0 38954 22 0 28983 0 13 0 28996 13 0 1994 0 37 0 2031 37 2 1889 0 5 0 1894 5 0 10426 0 4 0 10430 4 0 10332 0 8 0 10340 8 0 5307 1 4 0 5312 5 0 1790 0 2 1 1793 3 0 25278 0 103 0 25381 103 0 14218 0 17 0 14235 17 0
chrM 3480 3481 A 22066 0 45 1 22112 46 0 17217 1 20 0 17238 21 0 1704 0 37 0 1741 37 2 1732 0 3 0 1735 3 0 6049 2 6 1 6058 9 0 5498 1 6 0 5505 7 0 4669 0 7 0 4676 7 0 1589 0 0 0 1589 0 0 14664 0 95 0 14759 95 0 8272 0 21 1 8294 22 0
chrM 5063 5064 T 3 91 5 79483 79582 99 0 4 59 3 59163 59229 66 0 0 45 0 2293 2338 45 2 1 46 0 2247 2294 47 2 0 16 1 20733 20750 17 0 0 22 0 20220 20242 22 0 2 4 0 5222 5228 6 0 0 5 0 2068 2073 5 0 4 31 2 49253 49290 37 0 2 37 2 28632 28673 41 0
chrM 5580 5581 C 2 13 1 12180 12196 12183 1 0 10 0 8677 8687 8677 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 0 3115 3119 3116 1 0 1 0 2806 2807 2806 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 5995 6001 5995 1 0 6 0 3799 3805 3799 1
chrM 7028 7029 T 8 5269 1 105 5383 5278 2 4 3685 2 55 3746 3691 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1562 0 51 1614 1563 2 1 1396 0 47 1444 1397 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3503 0 341 3847 3506 2 2 1928 0 67 1997 1930 2
chrM 8701 8702 G 65164 7 68 1 65240 65172 1 51607 3 70 1 51681 51611 1 3206 0 2 0 3208 3206 1 3036 0 8 0 3045 3036 1 18911 0 22 0 18933 18911 1 17348 1 21 1 17371 17350 1 7376 0 7 0 7384 7376 1 2752 0 6 0 2758 2752 1 44676 5 36 1 44718 44682 1 24266 1 33 3 24303 24270 1
chrM 8992 8993 C 6 32924 2 16918 49850 16926 2 9 20572 2 16675 37258 16686 2 0 1292 0 587 1879 587 2 0 1324 0 607 1931 607 2 1 9979 0 5030 15010 5031 2 2 9001 3 4879 13885 4884 2 1 2413 0 2171 4585 2172 2 1 828 0 604 1433 605 2 8 22642 1 10798 33449 10807 2 6 12485 0 5968 18459 5974 2
chrM 9377 9378 G 29155 4 68 3 29230 29162 1 22590 1 52 1 22644 22592 1 1311 0 5 0 1316 1311 1 1413 1 4 0 1418 1414 1 8996 0 18 0 9014 8996 1 8356 2 21 0 8379 8358 1 3699 0 5 0 3704 3699 1 1000 0 8 0 1008 1000 1 20883 0 37 1 20921 20884 1 10550 2 27 0 10579 10552 1
chrM 9540 9541 C 4 8 4 28819 28835 28827 1 0 9 1 22950 22960 22951 1 0 1 0 2325 2327 2325 1 0 3 0 2325 2328 2325 1 0 1 2 7816 7819 7818 1 0 2 0 7913 7915 7913 1 0 2 0 5783 5786 5783 1 0 0 0 2036 2036 2036 1 0 5 1 16604 16610 16605 1 0 4 1 11200 11205 11201 1
chrM 10398 10399 G 66134 2 150 8 66294 66144 1 48839 0 93 2 48934 48841 1 2035 0 43 0 2078 2035 2 2565 0 11 0 2576 2565 1 17496 0 24 2 17522 17498 1 16169 1 27 0 16197 16170 1 5940 0 4 1 5945 5941 1 2232 0 5 1 2238 2233 1 36668 4 232 2 36906 36674 1 22711 1 66 0 22778 22712 1
chrM 10550 10551 A 74049 6 63 2 74120 71 0 56316 0 47 0 56363 47 0 3414 0 62 0 3476 62 2 3268 0 3 0 3271 3 0 20413 0 20 1 20434 21 0 20500 1 23 0 20524 24 0 8413 0 4 3 8420 7 0 2905 1 0 0 2906 1 0 49435 3 246 1 49685 250 0 26154 0 39 0 26193 39 0
chrM 10819 10820 G 102048 8 109 0 102165 102056 1 98352 15 73 1 98441 98368 1 11816 1 8 1 11849 11818 1 17967 2 17 1 18020 17970 1 34660 5 38 0 34703 34665 1 45769 5 42 1 45817 45775 1 45832 2 18 6 45917 45840 1 21529 2 17 2 21603 21533 1 55823 7 41 1 55872 55831 1 41514 1 39 1 41555 41516 1
chrM 10873 10874 C 4 334 8 101706 102052 101718 1 6 306 5 110569 110886 110580 1 0 7 0 3345 3352 3345 1 0 8 1 3306 3315 3307 1 1 128 1 41600 41730 41602 1 3 130 3 51874 52010 51880 1 2 16 0 8571 8589 8573 1 0 11 0 3417 3428 3417 1 3 176 4 67437 67620 67444 1 2 92 1 39849 39944 39852 1
chrM 11017 11018 C 2 107 2 56456 56567 56460 1 0 81 1 47605 47687 47606 1 3 14 0 4468 4485 4471 1 5 28 0 8816 8849 8821 1 1 24 0 18568 18593 18569 1 0 28 2 21379 21409 21381 1 8 44 2 28099 28154 28109 1 2 40 5 12017 12064 12024 1 1 36 3 33901 33941 33905 1 1 39 0 20246 20286 20247 1
chrM 11299 11300 T 10 336 9 110226 110581 355 0 11 245 5 88175 88436 261 0 1 105 1 6018 6125 107 2 0 26 0 6381 6407 26 0 3 90 3 34717 34813 96 0 5 122 0 43156 43283 127 0 2 55 0 16730 16787 57 0 1 31 0 8903 8935 32 0 8 365 7 62861 63241 380 0 5 134 6 39079 39224 145 0
chrM 11719 11720 A 99 2 39249 3 39353 39254 1 62 4 34101 8 34175 34113 1 1 0 1332 0 1333 1332 1 1 0 1821 1 1823 1822 1 26 0 14441 0 14467 14441 1 33 0 20179 2 20214 20181 1 4 0 5059 1 5064 5060 1 2 0 1607 0 1609 1607 1 58 3 17478 1 17540 17482 1 30 0 15111 1 15142 15112 1
chrM 11722 11723 C 1 35 0 41858 41894 41859 1 1 29 0 36410 36440 36411 1 0 3 0 1385 1388 1385 1 0 2 0 1935 1937 1935 1 0 6 0 15395 15401 15395 1 0 15 0 21603 21618 21603 1 0 6 2 5159 5167 5161 1 1 2 1 1664 1668 1666 1 0 7 0 18965 18972 18965 1 0 13 1 16136 16150 16137 1
chrM 12705 12706 T 10 75459 0 22 75491 75469 1 10 65631 1 17 65659 65642 1 0 3062 1 0 3063 3063 1 1 4062 0 1 4065 4063 1 3 25753 0 7 25763 25756 1 5 37515 0 12 37532 37520 1 0 11340 0 9 11349 11340 1 0 4052 0 1 4053 4052 1 8 34266 0 3 34277 34274 1 8 27100 0 7 27115 27108 1
chrM 12850 12851 G 46567 1 36 1 46605 46569 1 40398 2 31 0 40431 40400 1 1317 0 0 0 1317 1317 1 1893 0 3 0 1896 1893 1 16848 2 4 0 16854 16850 1 24019 1 20 0 24040 24020 1 4794 0 7 0 4801 4794 1 1550 0 1 0 1551 1550 1 21752 0 13 0 21765 21752 1 17627 0 18 0 17645 17627 1
chrM 14053 14054 A 26124 15 101 4 26244 120 0 26956 4 63 3 27026 70 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8438 5 15 3 8461 23 0 13898 4 45 3 13950 52 0 687 1 9 2 699 12 1 0 0 0 0 0 0 0 9397 4 23 0 9424 27 0 9886 4 25 0 9915 29 0
chrM 14212 14213 C 2 41 1 56177 56221 56180 1 1 28 1 51914 51944 51916 1 1 2 0 1716 1719 1717 1 0 2 0 2198 2200 2198 1 0 2 2 19614 19618 19616 1 1 23 1 29488 29513 29490 1 1 3 0 6082 6087 6083 1 0 0 0 2066 2066 2066 1 0 9 0 28450 28459 28450 1 0 17 0 21138 21155 21138 1
chrM 14580 14581 G 45013 2 25 1 45041 45016 1 41510 2 24 0 41536 41512 1 2618 0 0 0 2618 2618 1 3842 0 2 2 3846 3844 1 15738 1 8 0 15747 15739 1 23187 1 22 1 23211 23189 1 9996 0 4 1 10001 9997 1 4043 0 1 0 4044 4043 1 19632 1 3 0 19636 19633 1 16565 0 16 0 16581 16565 1
chrM 14766 14767 T 6 46856 3 61 46926 46865 1 6 43558 2 35 43601 43566 1 0 2111 0 2 2113 2111 1 0 3170 0 1 3171 3170 1 2 17178 1 17 17198 17181 1 4 23031 1 30 23066 23036 1 3 8510 0 7 8520 8513 1 1 3048 0 6 3055 3049 1 1 20274 0 51 20326 20275 1 2 17619 0 37 17658 17621 1
chrM 14905 14906 A 15 1 39481 7 39504 39489 1 10 0 35463 9 35482 35472 1 1 0 2479 0 2480 2479 1 0 0 3393 0 3393 3393 1 5 1 15201 0 15207 15202 1 5 1 22237 5 22248 22243 1 1 1 9729 2 9733 9732 1 2 0 3152 0 3154 3152 1 9 0 19057 3 19069 19060 1 4 0 14805 2 14811 14807 1
chrM 15301 15302 A 19 3 46253 2 46277 46258 1 15 0 40199 2 40216 40201 1 0 0 3325 0 3325 3325 1 0 0 4466 0 4466 4466 1 7 1 16415 1 16424 16417 1 6 0 22924 3 22933 22927 1 8 0 12264 5 12277 12269 1 0 0 4301 1 4302 4302 1 5 1 22130 2 22138 22133 1 7 0 18198 0 18205 18198 1
chrM 15932 15933 C 6 15 3 59133 59157 59142 1 0 20 2 54009 54031 54011 1 0 0 0 3323 3323 3323 1 0 6 0 5061 5067 5061 1 0 8 0 21128 21136 21128 1 1 24 0 32868 32893 32869 1 2 3 0 13485 13492 13487 1 0 3 1 5238 5242 5239 1 2 3 0 20445 20450 20447 1 1 14 0 20645 20660 20646 1
chrM 16172 16173 C 4 26 0 10165 10195 10169 1 2 8 0 9289 9299 9291 1 0 15 0 1380 1395 1380 1 0 5 0 1429 1434 1429 1 0 0 1 3986 3987 3987 1 0 2 1 5510 5513 5511 1 0 8 0 4092 4100 4092 1 0 3 0 1404 1407 1404 1 0 3 0 4706 4709 4706 1 0 10 0 3883 3893 3883 1
chrM 16183 16184 C 2687 5 2 0 2694 2689 1 2563 4 1 0 2568 2564 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1174 2 0 0 1176 1174 1 1520 4 0 0 1524 1520 1 477 3 0 1 698 478 1 0 0 0 0 0 0 0 1174 1 0 0 1175 1174 1 1133 1 0 0 1134 1133 1
chrM 16184 16185 C 0 2210 0 0 2210 0 0 0 2051 0 0 2051 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 888 0 0 888 0 0 0 1181 0 0 1181 0 0 306 663 2 0 972 308 2 0 0 0 0 0 0 0 0 924 0 0 924 0 0 0 914 0 0 914 0 0
chrM 16189 16190 C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 987 0 26 1013 26 2 0 1079 0 39 1118 39 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2974 0 98 3072 98 2 0 998 0 36 1034 36 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
chrM 16190 16191 C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 49 0 931 980 931 2 0 61 0 1080 1141 1080 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 188 0 2842 3030 2842 2 0 55 0 951 1006 951 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
chrM 16224 16225 T 4 17135 0 11 17150 17139 1 1 14988 0 0 14989 14989 1 0 1957 0 0 1957 1957 1 0 2510 0 2 2513 2510 1 0 6840 0 1 6841 6840 1 2 8277 0 9 8288 8279 1 1 6934 0 3 6938 6935 1 0 2431 1 0 2432 2432 1 1 8744 0 2 8747 8745 1 2 6450 1 3 6456 6453 1
chrM 16240 16241 C 1 48 1 22188 22238 22190 1 0 26 1 19721 19748 19722 1 0 3 0 2305 2308 2305 1 0 5 0 3050 3055 3050 1 0 11 2 8824 8837 8826 1 0 26 0 10813 10839 10813 1 1 7 0 8378 8387 8379 1 0 5 0 2884 2889 2884 1 1 26 0 11620 11647 11621 1 0 9 0 8493 8502 8493 1
chrM 16321 16322 T 4 55783 1 23 55811 55788 1 4 48176 0 16 48196 48180 1 0 4551 1 2 4554 4552 1 0 4846 0 3 4849 4846 1 3 20330 0 11 20344 20333 1 4 27565 0 12 27581 27569 1 2 14910 0 3 14916 14912 1 0 5105 0 2 5108 5105 1 1 26605 0 10 26616 26606 1 5 21141 0 8 21154 21146 1
1
0

galaxy-dist commit 14fd007fc550: Fix setting of minimum and maximum values for tracker slider filters.
by commits-noreply@bitbucket.org 20 Nov '10
by commits-noreply@bitbucket.org 20 Nov '10
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1287549765 14400
# Node ID 14fd007fc550092df7ea23f1019ab2d99ba03ce2
# Parent 11031e92204b1590ff05119515673d37ae834188
Fix setting of minimum and maximum values for tracker slider filters.
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -462,11 +462,11 @@ var NumberFilter = function( name, index
// Index into payload to filter.
this.index = index;
// Filter low/high. These values are used to filter elements.
- this.low = Number.MIN_VALUE;
+ this.low = -Number.MAX_VALUE;
this.high = Number.MAX_VALUE;
// Slide min/max. These values are used to set/update slider.
this.slider_min = Number.MAX_VALUE;
- this.slider_max = Number.MIN_VALUE;
+ this.slider_max = -Number.MAX_VALUE;
// UI Slider element and label that is associated with filter.
this.slider = null;
this.slider_label = null;
@@ -571,15 +571,14 @@ var Track = function (name, view, parent
var name_span = $("<span class='name'>").appendTo(filter_th);
name_span.text(filter.name + " "); // Extra spacing to separate name and values
var values_span = $("<span class='values'>").appendTo(filter_th);
- values_span.text("[0-2]");
// TODO: generate custom interaction elements based on filter type.
var table_data = $("<td>").appendTo(table_row);
filter.control_element = $("<div id='" + filter.name + "-filter-control' style='width: 200px; position: relative'>").appendTo(table_data);
filter.control_element.slider({
range: true,
- min: 0,
- max: 1,
- values: [0, 1],
+ min: Number.MAX_VALUE,
+ max: -Number.MIN_VALUE,
+ values: [0, 0],
slide: function( event, ui ) {
var values = ui.values;
// Set new values in UI.
@@ -804,8 +803,9 @@ var TiledTrack = function() {
}
// Update filtering UI.
- for (var f = 0; f < track.filters.length; f++)
+ for (var f = 0; f < track.filters.length; f++) {
track.filters[f].update_ui_elt();
+ }
// Method complete; do not call it again.
clearInterval(intervalId);
}
--- a/static/scripts/packed/trackster.js
+++ b/static/scripts/packed/trackster.js
@@ -1,1 +1,1 @@
-var DENSITY=200,FEATURE_LEVELS=10,MAX_FEATURE_DEPTH=50,CONNECTOR_COLOR="#ccc",DATA_ERROR="There was an error in indexing this dataset.",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",FILTERABLE_CLASS="filterable",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/st
rand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function round_1000(a){return Math.round(a*1000)/1000}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,d,c,b){this.container=a;this.vis_id=c;this.dbkey=b;this.title=d;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_i
d_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{init:function(){var c=this.container,a=this;this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(c);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_container=$("<div/>").addClass("nav-container").appendTo(c);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Clo
se Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div />").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>").attr("action",function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);var b=function(d){if(d.type==="focusout"||(d.keyCode||d.which)===13||(d.keyCode||d.which)===27){if((d.keyCode||d.which)!==27){a.go_to($(this).val())}$(this).hide();a.location_span.show();a.chrom_select.show();r
eturn false}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keypress focusout",b).appendTo(this.chrom_form);this.location_span=$("<span/>").addClass("location").appendTo(this.chrom_form);this.location_span.bind("click",function(){a.location_span.hide();a.chrom_select.hide();a.nav_input.css("display","inline-block");a.nav_input.select();a.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}),dataType:"json",success:function(d){if(d.reference){a.add_label_track(new Referenc
eTrack(a))}a.chrom_data=d.chrom_info;var f='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var e=a.chrom_data[i]["chrom"];f+='<option value="'+e+'">'+e+"</option>"}a.chrom_select.html(f);a.intro_div.show();a.chrom_select.bind("change",function(){a.change_chrom(a.chrom_select.val())})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_div.bind("dblclick",function(d){a.zoom_in(d.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(d){this.current_x=d.offsetX}).bind("drag",function(d){var g=d.offsetX-this.current_x;this.current_x=d.offsetX;var f=Math.round(g/a.viewport_container.width()*(a.max_high-a.max_low));a.move_delta(-f)});this.overview_close.bind("click",function(){for(var d in a.tracks){a.tracks[d].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",a.overview_box.height());a.overview_highlight.hide();$(this).hide()});this.viewport_container.bind
("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.enable_pan=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.enable_pan||this.in_reordering){return}var d=$(this);var j=g.offsetX-this.current_x;var f=d.scrollTop()-(g.clientY-this.current_height);d.scrollTop(f);this.current_height=g.clientY;this.current_x=g.offsetX;var h=Math.round(j/a.viewport_container.width()*(a.high-a.low));a.move_delta(h)});this.top_labeltrack.bind("dragstart",function(d){this.drag_origin_x=d.clientX;this.drag_origin_pos=d.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_div=$("<div />").css({height:a.content_div.height()+30,top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(j){var f=Math.min(j.clientX,this.drag_origin_x)-a.container.offset().left,d=Math.max(j.clientX,this.drag_origin_x)-a.
container.offset().left,h=(a.high-a.low),g=a.viewport_container.width();a.update_location(Math.round(f/g*h)+a.low,Math.round(d/g*h)+a.low);this.drag_div.css({left:f+"px",width:(d-f)+"px"})}).bind("dragend",function(k){var f=Math.min(k.clientX,this.drag_origin_x),d=Math.max(k.clientX,this.drag_origin_x),h=(a.high-a.low),g=a.viewport_container.width(),j=a.low;a.low=Math.round(f/g*h)+j;a.high=Math.round(d/g*h)+j;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},update_location:function(a,b){this.location_span.text(commatize(a)+" - "+commatize(b));this.nav_input.val(this.chrom+":"+commatize(a)+"-"+commatize(b))},change_chrom:function(d,a,f){var c=this;var e=$.grep(c.chrom_data,function(h,j){return h.chrom===d})[0];if(e===undefined){return}if(d!==c.chrom){c.chrom=d;if(!c.chrom){c.intro_div.show()}else{c.intro_div.hide()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.re
set();c.redraw(true);for(var g in c.tracks){var b=c.tracks[g];if(b.init){b.init()}}}if(a!==undefined&&f!==undefined){c.low=Math.max(a,0);c.high=Math.min(f,c.max_high)}c.reset_overview();c.redraw()},go_to:function(f){var k=this,b=f.split(":"),h=b[0],j=b[1];if(j!==undefined){try{var g=j.split("-"),a=parseInt(g[0].replace(/,/g,"")),d=parseInt(g[1].replace(/,/g,""))}catch(c){return false}}k.change_chrom(h,a,d)},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.high-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.track_id);this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).re
move()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(h){var g=this.high-this.low,f=this.low,b=this.high;if(f<this.max_low){f=this.max_low}if(b>this.max_high){b=this.max_high}if(this.high!==0&&g<this.min_separation){b=f+this.min_separation}this.low=Math.floor(f);this.high=Math.ceil(b);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));var a=this.low/(this.max_high-this.max_low)*this.overview_viewport.width();var e=(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width();var j=13;this.overview_box.css({left:a,width:Math.max(j,e)}).show();if(e<j){this.overview_box.css("left",a-(j-e)/2)}if(this.overview_highlight){this.overview_highlight.css({left
:a,width:e})}this.update_location(this.low,this.high);if(!h){for(var c=0,d=this.tracks.length;c<d;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,d=this.label_tracks.length;c<d;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var Filter=functio
n(b,a,c){this.name=b;this.index=a;this.value=c};var NumberFilter=function(b,a){this.name=b;this.index=a;this.low=Number.MIN_VALUE;this.high=Number.MAX_VALUE;this.slider_min=Number.MAX_VALUE;this.slider_max=Number.MIN_VALUE;this.slider=null;this.slider_label=null};$.extend(NumberFilter.prototype,{applies_to:function(a){if(a.length>this.index){return true}return false},keep:function(a){if(!this.applies_to(a)){return true}return(a[this.index]>=this.low&&a[this.index]<=this.high)},update_attrs:function(b){var a=false;if(!this.applies_to(b)){return a}if(b[this.index]<this.slider_min){this.slider_min=b[this.index];a=true}if(b[this.index]>this.slider_max){this.slider_max=b[this.index];a=false}return a},update_ui_elt:function(){var b=this.slider.slider("option","min"),a=this.slider.slider("option","max");if(this.slider_min<b||this.slider_max>a){this.slider.slider("option","min",this.slider_min);this.slider.slider("option","max",this.slider_max);this.slider.slider("option","values",[
this.slider_min,this.slider_max])}}});var get_filters=function(a){var g=[];for(var d=0;d<a.length;d++){var f=a[d];var c=f.name,e=f.type,b=f.index;if(e=="int"||e=="float"){g[d]=new NumberFilter(c,b)}else{g[d]=new Filter(c,b,e)}}return g};var Track=function(b,a,d,c){this.name=b;this.view=a;this.parent_element=d;this.filters=(c!==undefined?get_filters(c):[]);this.init_global()};$.extend(Track.prototype,{init_global:function(){this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.filtering_div=$("<div class='track-filters'>").appendTo(this.container_div);this.fil
tering_div.hide();this.filtering_div.bind("drag",function(k){k.stopPropagation()});var b=$("<table class='filters'>").appendTo(this.filtering_div);var c=this;for(var e=0;e<this.filters.length;e++){var a=this.filters[e];var f=$("<tr>").appendTo(b);var g=$("<th class='filter-info'>").appendTo(f);var j=$("<span class='name'>").appendTo(g);j.text(a.name+" ");var d=$("<span class='values'>").appendTo(g);d.text("[0-2]");var h=$("<td>").appendTo(f);a.control_element=$("<div id='"+a.name+"-filter-control' style='width: 200px; position: relative'>").appendTo(h);a.control_element.slider({range:true,min:0,max:1,values:[0,1],slide:function(l,m){var k=m.values;d.text("["+k[0]+"-"+k[1]+"]");a.low=k[0];a.high=k[1];c.draw(true)},change:function(k,l){a.control_element.slider("option","slide").call(a.control_element,k,l)}});a.slider=a.control_element;a.slider_label=d}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(this.container_div)}
,init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.initial_canvas=undefined;a.content_div.css("height","auto");if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSON(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending"){a.container_di
v.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){var d=this,c=d.view;if(d.hidden){return}if(d.display_modes!==undefined){if(d.mode_div===undefined){d.mode_div=$("<div class='right-float menubutton popup' />").appendTo(d.header_div);var h=d.display_modes[0];d.mode=h;d.mode_div.text(h);var a=function(j){d.mode_div.text(j);d.mode=j;d.tile_cache.clear();d.draw()};var f={};for(var e in d.display_modes){var g=d.display_modes[e];f[g]=function(j){return function(){a(j)}}(g)}make_popupmenu(d.mode_div,f)}else{d.mode_div.hide()}}var b={};b["Set as overview"]=function(){c.overview_viewport.find("canvas").remove();d.is_overview=true;d.set_overview();for(var j in c.tracks){if(c.tracks[j]!==d){c.tracks[j].is_overview=false}}};b["Edit configur
ation"]=function(){var l=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},j=function(){d.update_options(d.track_id);hide_modal();$(window).unbind("keypress.check_enter_esc")},k=function(m){if((m.keyCode||m.which)===27){l()}else{if((m.keyCode||m.which)===13){j()}}};$(window).bind("keypress.check_enter_esc",k);show_modal("Configure Track",d.gen_options(d.track_id),{Cancel:l,OK:j})};if(d.filters.length>0){b["Show filters"]=function(){var j;if(!d.filtering_div.is(":visible")){j="Hide filters";d.filters_visible=true}else{j="Show filters";d.filters_visible=false}$("#"+d.name_div.attr("id")+"-menu").find("li").eq(2).text(j);d.filtering_div.toggle()}}b.Remove=function(){c.remove_track(d);if(c.num_tracks===0){$("#no-tracks").show()}};d.popup_menu=make_popupmenu(d.name_div,b);show_hide_popupmenu_options(d.popup_menu,"(Show|Hide) filters",false)};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(b){var m=this.view.low,g=this.view.high,h=g-m,f=this.view.r
esolution;var p=$("<div style='position: relative;'></div>"),q=this.content_div.width()/h,k;this.content_div.append(p),this.max_height=0;var a=Math.floor(m/f/DENSITY);var l=new Object();while((a*DENSITY*f)<g){var n=this.content_div.width()+"_"+q+"_"+a;var e=this.tile_cache.get(n);if(!b&&e){var j=a*DENSITY*f;var d=(j-m)*q;if(this.left_offset){d-=this.left_offset}e.css({left:d});this.show_tile(e,p)}else{this.delayed_draw(this,n,m,g,a,f,p,q,l)}a+=1}var c=this;var o=setInterval(function(){if(l.length!=0){if(c.content_div.children().length>1){c.content_div.children(":first").remove()}for(var r=0;r<c.filters.length;r++){c.filters[r].update_ui_elt()}clearInterval(o)}},50)},delayed_draw:function(c,h,g,e,b,d,j,k,f){var a=setTimeout(function(){if(!(g>c.view.high||e<c.view.low)){tile_element=c.draw_tile(d,b,j,k);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var n=tile_element.get(0).getContext("2d");var l=c.initial_canvas.get(0).getContext("2d");var m=
n.getImageData(0,0,n.canvas.width,n.canvas.height);l.putImageData(m,0,0);c.set_overview()}c.tile_cache.set(h,tile_element);c.show_tile(tile_element,j)}}delete f.id},50);f.id=true},show_tile:function(a,c){var b=this;c.append(a);b.max_height=Math.max(b.max_height,a.height());b.content_div.css("height",b.max_height+"px");if(a.hasClass(FILTERABLE_CLASS)){show_hide_popupmenu_options(b.popup_menu,"(Show|Hide) filters");if(b.filters_visible){b.filtering_div.show()}}else{show_hide_popupmenu_options(b.popup_menu,"(Show|Hide) filters",false);b.filtering_div.hide()}},set_overview:function(){var a=this.view;if(this.initial_canvas&&this.is_overview){a.overview_close.show();a.overview_viewport.append(this.initial_canvas);a.overview_highlight.show().height(this.initial_canvas.height());a.overview_viewport.height(this.initial_canvas.height()+a.overview_box.height())}$(window).trigger("resize")}});var LabelTrack=function(a,b){this.track_type="LabelTrack";this.hidden=true;Track.call(this,null
,a,b);this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";this.hidden=true;Track.call(this,null,a,a.top_labeltrack);TiledTrack.call(this);this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrack.prototype,{get_
data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(f,b,l,p){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),o=e.get(0).getContext("2d"),k=f+"_"+b;if(p>PX_PER_CHAR){if(this.data_cache.get(k)===undefined){this.get_data(f,b);return}var n=this.data_cache.get(k);if(n===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*p+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*p-this.left_offset});for(var h=0,m=n.length;h<m;h++){var a=Math.round(h*p),j=Math.round(p/2);o.fillText(n[h],a+this.left_offset+j,10)}l.append(e);return e}this.content_div.css("height","0px")}});var LineTrack=fu
nction(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=80;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={color:"black",min_value:undefined,max_value:undefined,mode:this.mode};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_value=c.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#tr
ack_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;a.container_div.find(".yaxislabel").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(round_1000(a.prefs.min_value));var d=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(round_1000(a.prefs.max_value));d.css({position:"absolute",top:"22px",left:"10px"});d.prependTo(a.container_div);e.css({position:"absolute",top:a.height_px+11+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:fu
nction(p,s,c,e){if(this.vertical_range===undefined){return}var t=s*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),w=p+"_"+s;if(this.data_cache.get(w)===undefined){this.get_data(p,s);return}var j=this.data_cache.get(w);if(j===null){return}b.css({position:"absolute",top:0,left:(t-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,u=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();o.fillStyle=this.prefs.color;if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var v,h;for(var q=0,r=data.length;q<r;q++){v=Math.round((data[q][0]-t)*e);h=data[q][1];if(h===null){if(k&&m==="Filled"){o.lineTo(v,d)}k=false;continue}if(h<l){h=l}else{if(h>g){h=g}}if(m==="Histogram"){h=Math.round(d-(h-l)/n*d);o.fillRect(v,h,f,d-h)}else{if(m==="Intensity"){h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")
";o.fillRect(v,0,f,d)}else{h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(v,h)}else{k=true;if(m==="Filled"){o.moveTo(v,d);o.lineTo(v,h)}else{o.moveTo(v,h)}}}}}if(m==="Filled"){if(k){o.lineTo(v,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(n){var a=$("<div />").addClass("form-row");var e="track_"+n+"_color",b=$("<label />").attr("for",e).text("Color:"),c=$("<input />").attr("id",e).attr("name",e).val(this.prefs.color),h="track_"+n+"_minval",m=$("<label></label>").attr("for",h).text("Min value:"),d=(this.prefs.min_value===undefined?"":this.prefs.min_value),l=$("<input></input>").attr("id",h).val(d),k="track_"+n+"_maxval",g=$("<label></label>").attr("for",k).text("Max value:"),j=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",k).val(j);return a.append(m).append(l).append(g).append(f).append(b).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();color=$("#track_
"+c+"_color").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value||color!==this.prefs.color){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.prefs.color=color;this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,e,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container,e);TiledTrack.call(this);this.height_px=0;this.container_div.addClass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=2;this.summary_draw_height=30;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATU
RE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"#444",label_color:"black",show_counts:true};if(c.block_color!==undefined){this.prefs.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b="initial";this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution,mode:a.mode},function(c){a.mode_div.show();a.data_cache.set(b,c);a.draw()})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.inc_slots[a]={};t
his.inc_slots[a].w_scale=a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==undefined&&!c){var t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(v<=MAX_FEATURE_DEPTH){var p=true;if(this.s_e_by_tile[a][v]!==undefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_tile[a][v]===undefined){this.s_e_by_tile[a][v]=[]}this.s_e_by_ti
le[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(r,m,s,b,q,f,h,e){r.textAlign="center";var l=0,p=Math.round(m/2);for(cig_id in h){var k=h[cig_id],d="MIDNSHP"[k[0]],n=k[1];if(d==="H"||d==="S"){l-=n}var g=q+l,v=Math.floor(Math.max(0,(g-s)*m)),j=Math.floor(Math.max(0,(g+n-s)*m));switch(d){case"S":case"H":case"M":var o=f.slice(l,n);if((this.mode==="Pack"||this.mode==="Auto")&&f!==undefined&&m>PX_PER_CHAR){r.fillStyle=this.prefs.block_color;r.fillRect(v+this.left_offset,e+1,j-v,9);r.fillStyle=CONNECTOR_COLOR;for(var t=0,a=o.length;t<a;t++){if(g+t>=s&&g+t<=b){var u=Math.floor(Math.max(0,(g+t-s)*m));r.fillText(o[t],u+this.left_offset+p,e+9)}}}else{r.fillStyle=this.prefs.block_color;r.fillRect(v+this.left_offset,e+4,j-v,3)}break;case"N":r.fillStyle=CONNECTOR_COLOR;r.fillRect(v+this.left_offset,e+5,j-v,1);break;case"D":r.fillStyle="red";r.fillRect(v+this.left_offset,e+4,j-v,3);break;case"P":case"I":break}l+=n}},draw_tile:function(
ah,o,s,aw){var N=o*DENSITY*ah,am=(o+1)*DENSITY*ah,M=am-N;var ao=(!this.initial_canvas?"initial":N+"_"+am);var I=this.data_cache.get(ao);var e;if(I===undefined||(this.mode!=="Auto"&&I.dataset_type==="summary_tree")){this.data_queue[[N,am]]=true;this.get_data(N,am);return}var a=Math.ceil(M*aw),S=$("<canvas class='tile'></canvas>"),aj=this.prefs.label_color,l=this.prefs.block_color,r=this.mode,z=25,af=(r==="Squish")||(r==="Dense")&&(r!=="Pack")||(r==="Auto"&&(I.extra_info==="no_detail")),X=this.left_offset,av,D,ax;if(I.dataset_type==="summary_tree"){D=this.summary_draw_height}else{if(r==="Dense"){D=z;ax=10}else{ax=(af?this.vertical_nodetail_px:this.vertical_detail_px);var A=(aw<0.0001?1/view.zoom_res:aw);D=this.incremental_slots(A,I.data,af,r)*ax+z;av=this.inc_slots[A]}}S.css({position:"absolute",top:0,left:(N-this.view.low)*aw-X});S.get(0).width=a+X;S.get(0).height=D;s.parent().css("height",Math.max(this.height_px,D)+"px");var J=S.get(0).getContext("2d");J.fillStyle=l;J.font=t
his.default_font;J.textAlign="right";this.container_div.find(".yaxislabel").remove();if(I.dataset_type=="summary_tree"){var Z=I.data,L=I.max,q=I.avg,b=Math.ceil(I.delta*aw);var p=$("<div />").addClass("yaxislabel").text(L);p.css({position:"absolute",top:"22px",left:"10px"});p.prependTo(this.container_div);for(var aq=0,H=Z.length;aq<H;aq++){var ab=Math.floor((Z[aq][0]-N)*aw);var aa=Z[aq][1];if(!aa){continue}var an=aa/L*this.summary_draw_height;J.fillStyle="black";J.fillRect(ab+X,this.summary_draw_height-an,b,an);if(this.prefs.show_counts&&J.measureText(aa).width<b){J.fillStyle="#bbb";J.textAlign="center";J.fillText(aa,ab+X+(b/2),this.summary_draw_height-5)}}e="Summary";s.append(S);return S}if(I.message){S.css({border:"solid red","border-width":"2px 2px 2px 0px"});J.fillStyle="red";J.textAlign="left";J.fillText(I.message,100+X,ax)}var ae=false;if(I.data.length!=0){ae=true;for(var at=0;at<this.filters.length;at++){if(!this.filters[at].applies_to(I.data[0])){ae=false}}}if(ae){S.
addClass(FILTERABLE_CLASS)}var au=I.data;var ap=0;for(var aq=0,H=au.length;aq<H;aq++){var T=au[aq],R=T[0],ar=T[1],ad=T[2],O=T[3];if(av[R]===undefined){continue}var ac=false;var V;for(var at=0;at<this.filters.length;at++){V=this.filters[at];V.update_attrs(T);if(!V.keep(T)){ac=true;break}}if(ac){continue}if(ar<=am&&ad>=N){var ag=Math.floor(Math.max(0,(ar-N)*aw)),K=Math.ceil(Math.min(a,Math.max(0,(ad-N)*aw))),Y=(r==="Dense"?1:(1+av[R]))*ax;if(I.dataset_type==="bai"){var v=T[4];J.fillStyle=l;if(T[5] instanceof Array){var E=Math.floor(Math.max(0,(T[5][0]-N)*aw)),Q=Math.ceil(Math.min(a,Math.max(0,(T[5][1]-N)*aw))),C=Math.floor(Math.max(0,(T[6][0]-N)*aw)),w=Math.ceil(Math.min(a,Math.max(0,(T[6][1]-N)*aw)));if(T[5][1]>=N&&T[5][0]<=am){this.rect_or_text(J,aw,N,am,T[5][0],T[5][2],v,Y)}if(T[6][1]>=N&&T[6][0]<=am){this.rect_or_text(J,aw,N,am,T[6][0],T[6][2],v,Y)}if(C>Q){J.fillStyle=CONNECTOR_COLOR;J.fillRect(Q+X,Y+5,C-Q,1)}}else{J.fillStyle=l;this.rect_or_text(J,aw,N,am,ar,O,v,Y)}if(r!=
="Dense"&&!af&&ar>N){J.fillStyle=this.prefs.label_color;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(R,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(R,ag-2+X,Y+8)}J.fillStyle=l}}else{if(I.dataset_type==="interval_index"){if(af){J.fillStyle=l;J.fillRect(ag+X,Y+5,K-ag,1)}else{var G=T[4],W=T[5],ai=T[6],h=T[7];var F,ak,P=null,ay=null;if(W&&ai){P=Math.floor(Math.max(0,(W-N)*aw));ay=Math.ceil(Math.min(a,Math.max(0,(ai-N)*aw)))}if(r!=="Dense"&&O!==undefined&&ar>N){J.fillStyle=aj;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(O,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(O,ag-2+X,Y+8)}J.fillStyle=l}if(h){if(G){if(G=="+"){J.fillStyle=RIGHT_STRAND}else{if(G=="-"){J.fillStyle=LEFT_STRAND}}J.fillRect(ag+X,Y,K-ag,10);J.fillStyle=l}for(var ao=0,g=h.length;ao<g;ao++){var u=h[ao],d=Math.floor(Math.max(0,(u[0]-N)*aw)),U=Math.ceil(Math.min(a,Math.max((u[1]-N)*aw)));if(d>U){continue}F=5;ak=3;J.fillRect(d+X,Y+ak,U-d,F);if(P!==undefined&&!(d>ay||
U<P)){F=9;ak=1;var al=Math.max(d,P),B=Math.min(U,ay);J.fillRect(al+X,Y+ak,B-al,F)}}}else{F=9;ak=1;J.fillRect(ag+X,Y+ak,K-ag,F);if(T.strand){if(T.strand=="+"){J.fillStyle=RIGHT_STRAND_INV}else{if(T.strand=="-"){J.fillStyle=LEFT_STRAND_INV}}J.fillRect(ag+X,Y,K-ag,10);J.fillStyle=l}}}}else{if(I.dataset_type==="vcf"){if(af){J.fillStyle=l;J.fillRect(ag+X,Y+5,K-ag,1)}else{var t=T[4],n=T[5],c=T[6];F=9;ak=1;J.fillRect(ag+X,Y,K-ag,F);if(r!=="Dense"&&O!==undefined&&ar>N){J.fillStyle=aj;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(O,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(O,ag-2+X,Y+8)}J.fillStyle=l}var m=t+" / "+n;if(ar>N&&J.measureText(m).width<(K-ag)){J.fillStyle="white";J.textAlign="center";J.fillText(m,X+ag+(K-ag)/2,Y+8);J.fillStyle=l}}}}}ap++}}return S},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr("name",e).val(th
is.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,e,c){FeatureTrack.call(this,d,b,a,e,c);this.track_type="ReadTrack";this.vert
ical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
+var DENSITY=200,FEATURE_LEVELS=10,MAX_FEATURE_DEPTH=50,CONNECTOR_COLOR="#ccc",DATA_ERROR="There was an error in indexing this dataset.",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",FILTERABLE_CLASS="filterable",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/st
rand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function round_1000(a){return Math.round(a*1000)/1000}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,d,c,b){this.container=a;this.vis_id=c;this.dbkey=b;this.title=d;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_i
d_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{init:function(){var c=this.container,a=this;this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(c);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide();this.nav_container=$("<div/>").addClass("nav-container").appendTo(c);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_close=$("<a href='javascript:void(0);'>Clo
se Overview</a>").addClass("overview-close").hide().appendTo(this.overview_viewport);this.overview_highlight=$("<div />").addClass("overview-highlight").hide().appendTo(this.overview_viewport);this.overview_box_background=$("<div/>").addClass("overview-boxback").appendTo(this.overview_viewport);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.default_overview_height=this.overview_box.height();this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>").attr("action",function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);var b=function(d){if(d.type==="focusout"||(d.keyCode||d.which)===13||(d.keyCode||d.which)===27){if((d.keyCode||d.which)!==27){a.go_to($(this).val())}$(this).hide();a.location_span.show();a.chrom_select.show();r
eturn false}};this.nav_input=$("<input/>").addClass("nav-input").hide().bind("keypress focusout",b).appendTo(this.chrom_form);this.location_span=$("<span/>").addClass("location").appendTo(this.chrom_form);this.location_span.bind("click",function(){a.location_span.hide();a.chrom_select.hide();a.nav_input.css("display","inline-block");a.nav_input.select();a.nav_input.focus()});if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}),dataType:"json",success:function(d){if(d.reference){a.add_label_track(new Referenc
eTrack(a))}a.chrom_data=d.chrom_info;var f='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var e=a.chrom_data[i]["chrom"];f+='<option value="'+e+'">'+e+"</option>"}a.chrom_select.html(f);a.intro_div.show();a.chrom_select.bind("change",function(){a.change_chrom(a.chrom_select.val())})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_div.bind("dblclick",function(d){a.zoom_in(d.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(d){this.current_x=d.offsetX}).bind("drag",function(d){var g=d.offsetX-this.current_x;this.current_x=d.offsetX;var f=Math.round(g/a.viewport_container.width()*(a.max_high-a.max_low));a.move_delta(-f)});this.overview_close.bind("click",function(){for(var d in a.tracks){a.tracks[d].is_overview=false}$(this).siblings().filter("canvas").remove();$(this).parent().css("height",a.overview_box.height());a.overview_highlight.hide();$(this).hide()});this.viewport_container.bind
("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.enable_pan=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.enable_pan||this.in_reordering){return}var d=$(this);var j=g.offsetX-this.current_x;var f=d.scrollTop()-(g.clientY-this.current_height);d.scrollTop(f);this.current_height=g.clientY;this.current_x=g.offsetX;var h=Math.round(j/a.viewport_container.width()*(a.high-a.low));a.move_delta(h)});this.top_labeltrack.bind("dragstart",function(d){this.drag_origin_x=d.clientX;this.drag_origin_pos=d.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_div=$("<div />").css({height:a.content_div.height()+30,top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5,"z-index":1000}).appendTo($(this))}).bind("drag",function(j){var f=Math.min(j.clientX,this.drag_origin_x)-a.container.offset().left,d=Math.max(j.clientX,this.drag_origin_x)-a.
container.offset().left,h=(a.high-a.low),g=a.viewport_container.width();a.update_location(Math.round(f/g*h)+a.low,Math.round(d/g*h)+a.low);this.drag_div.css({left:f+"px",width:(d-f)+"px"})}).bind("dragend",function(k){var f=Math.min(k.clientX,this.drag_origin_x),d=Math.max(k.clientX,this.drag_origin_x),h=(a.high-a.low),g=a.viewport_container.width(),j=a.low;a.low=Math.round(f/g*h)+j;a.high=Math.round(d/g*h)+j;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},update_location:function(a,b){this.location_span.text(commatize(a)+" - "+commatize(b));this.nav_input.val(this.chrom+":"+commatize(a)+"-"+commatize(b))},change_chrom:function(d,a,f){var c=this;var e=$.grep(c.chrom_data,function(h,j){return h.chrom===d})[0];if(e===undefined){return}if(d!==c.chrom){c.chrom=d;if(!c.chrom){c.intro_div.show()}else{c.intro_div.hide()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.re
set();c.redraw(true);for(var g in c.tracks){var b=c.tracks[g];if(b.init){b.init()}}}if(a!==undefined&&f!==undefined){c.low=Math.max(a,0);c.high=Math.min(f,c.max_high)}c.reset_overview();c.redraw()},go_to:function(f){var k=this,b=f.split(":"),h=b[0],j=b[1];if(j!==undefined){try{var g=j.split("-"),a=parseInt(g[0].replace(/,/g,"")),d=parseInt(g[1].replace(/,/g,""))}catch(c){return false}}k.change_chrom(h,a,d)},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.high-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.track_id);this.track_id_counter+=1;this.num_tracks+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).re
move()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(h){var g=this.high-this.low,f=this.low,b=this.high;if(f<this.max_low){f=this.max_low}if(b>this.max_high){b=this.max_high}if(this.high!==0&&g<this.min_separation){b=f+this.min_separation}this.low=Math.floor(f);this.high=Math.ceil(b);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));var a=this.low/(this.max_high-this.max_low)*this.overview_viewport.width();var e=(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width();var j=13;this.overview_box.css({left:a,width:Math.max(j,e)}).show();if(e<j){this.overview_box.css("left",a-(j-e)/2)}if(this.overview_highlight){this.overview_highlight.css({left
:a,width:e})}this.update_location(this.low,this.high);if(!h){for(var c=0,d=this.tracks.length;c<d;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,d=this.label_tracks.length;c<d;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()},reset_overview:function(){this.overview_viewport.find("canvas").remove();this.overview_viewport.height(this.default_overview_height);this.overview_box.height(this.default_overview_height);this.overview_close.hide();this.overview_highlight.hide()}});var Filter=functio
n(b,a,c){this.name=b;this.index=a;this.value=c};var NumberFilter=function(b,a){this.name=b;this.index=a;this.low=-Number.MAX_VALUE;this.high=Number.MAX_VALUE;this.slider_min=Number.MAX_VALUE;this.slider_max=-Number.MAX_VALUE;this.slider=null;this.slider_label=null};$.extend(NumberFilter.prototype,{applies_to:function(a){if(a.length>this.index){return true}return false},keep:function(a){if(!this.applies_to(a)){return true}return(a[this.index]>=this.low&&a[this.index]<=this.high)},update_attrs:function(b){var a=false;if(!this.applies_to(b)){return a}if(b[this.index]<this.slider_min){this.slider_min=b[this.index];a=true}if(b[this.index]>this.slider_max){this.slider_max=b[this.index];a=false}return a},update_ui_elt:function(){var b=this.slider.slider("option","min"),a=this.slider.slider("option","max");if(this.slider_min<b||this.slider_max>a){this.slider.slider("option","min",this.slider_min);this.slider.slider("option","max",this.slider_max);this.slider.slider("option","values"
,[this.slider_min,this.slider_max])}}});var get_filters=function(a){var g=[];for(var d=0;d<a.length;d++){var f=a[d];var c=f.name,e=f.type,b=f.index;if(e=="int"||e=="float"){g[d]=new NumberFilter(c,b)}else{g[d]=new Filter(c,b,e)}}return g};var Track=function(b,a,d,c){this.name=b;this.view=a;this.parent_element=d;this.filters=(c!==undefined?get_filters(c):[]);this.init_global()};$.extend(Track.prototype,{init_global:function(){this.container_div=$("<div />").addClass("track").css("position","relative");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);if(this.view.editor){this.drag_div=$("<div class='draghandle' />").appendTo(this.header_div)}this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name);this.name_div.attr("id",this.name.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9\-]/g,"").toLowerCase())}this.filtering_div=$("<div class='track-filters'>").appendTo(this.container_div);this.f
iltering_div.hide();this.filtering_div.bind("drag",function(k){k.stopPropagation()});var b=$("<table class='filters'>").appendTo(this.filtering_div);var c=this;for(var e=0;e<this.filters.length;e++){var a=this.filters[e];var f=$("<tr>").appendTo(b);var g=$("<th class='filter-info'>").appendTo(f);var j=$("<span class='name'>").appendTo(g);j.text(a.name+" ");var d=$("<span class='values'>").appendTo(g);var h=$("<td>").appendTo(f);a.control_element=$("<div id='"+a.name+"-filter-control' style='width: 200px; position: relative'>").appendTo(h);a.control_element.slider({range:true,min:Number.MAX_VALUE,max:-Number.MIN_VALUE,values:[0,0],slide:function(l,m){var k=m.values;d.text("["+k[0]+"-"+k[1]+"]");a.low=k[0];a.high=k[1];c.draw(true)},change:function(k,l){a.control_element.slider("option","slide").call(a.control_element,k,l)}});a.slider=a.control_element;a.slider_label=d}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_element.append(thi
s.container_div)},init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.initial_canvas=undefined;a.content_div.css("height","auto");if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSON(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending
"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){var d=this,c=d.view;if(d.hidden){return}if(d.display_modes!==undefined){if(d.mode_div===undefined){d.mode_div=$("<div class='right-float menubutton popup' />").appendTo(d.header_div);var h=d.display_modes[0];d.mode=h;d.mode_div.text(h);var a=function(j){d.mode_div.text(j);d.mode=j;d.tile_cache.clear();d.draw()};var f={};for(var e in d.display_modes){var g=d.display_modes[e];f[g]=function(j){return function(){a(j)}}(g)}make_popupmenu(d.mode_div,f)}else{d.mode_div.hide()}}var b={};b["Set as overview"]=function(){c.overview_viewport.find("canvas").remove();d.is_overview=true;d.set_overview();for(var j in c.tracks){if(c.tracks[j]!==d){c.tracks[j].is_overview=false}}}
;b["Edit configuration"]=function(){var l=function(){hide_modal();$(window).unbind("keypress.check_enter_esc")},j=function(){d.update_options(d.track_id);hide_modal();$(window).unbind("keypress.check_enter_esc")},k=function(m){if((m.keyCode||m.which)===27){l()}else{if((m.keyCode||m.which)===13){j()}}};$(window).bind("keypress.check_enter_esc",k);show_modal("Configure Track",d.gen_options(d.track_id),{Cancel:l,OK:j})};if(d.filters.length>0){b["Show filters"]=function(){var j;if(!d.filtering_div.is(":visible")){j="Hide filters";d.filters_visible=true}else{j="Show filters";d.filters_visible=false}$("#"+d.name_div.attr("id")+"-menu").find("li").eq(2).text(j);d.filtering_div.toggle()}}b.Remove=function(){c.remove_track(d);if(c.num_tracks===0){$("#no-tracks").show()}};d.popup_menu=make_popupmenu(d.name_div,b);show_hide_popupmenu_options(d.popup_menu,"(Show|Hide) filters",false)};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(b){var m=this.view.low,g=this.view.high,h=
g-m,f=this.view.resolution;var p=$("<div style='position: relative;'></div>"),q=this.content_div.width()/h,k;this.content_div.append(p),this.max_height=0;var a=Math.floor(m/f/DENSITY);var l=new Object();while((a*DENSITY*f)<g){var n=this.content_div.width()+"_"+q+"_"+a;var e=this.tile_cache.get(n);if(!b&&e){var j=a*DENSITY*f;var d=(j-m)*q;if(this.left_offset){d-=this.left_offset}e.css({left:d});this.show_tile(e,p)}else{this.delayed_draw(this,n,m,g,a,f,p,q,l)}a+=1}var c=this;var o=setInterval(function(){if(l.length!=0){if(c.content_div.children().length>1){c.content_div.children(":first").remove()}for(var r=0;r<c.filters.length;r++){c.filters[r].update_ui_elt()}clearInterval(o)}},50)},delayed_draw:function(c,h,g,e,b,d,j,k,f){var a=setTimeout(function(){if(!(g>c.view.high||e<c.view.low)){tile_element=c.draw_tile(d,b,j,k);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var n=tile_element.get(0).getContext("2d");var l=c.initial_canvas.get(0).getCon
text("2d");var m=n.getImageData(0,0,n.canvas.width,n.canvas.height);l.putImageData(m,0,0);c.set_overview()}c.tile_cache.set(h,tile_element);c.show_tile(tile_element,j)}}delete f.id},50);f.id=true},show_tile:function(a,c){var b=this;c.append(a);b.max_height=Math.max(b.max_height,a.height());b.content_div.css("height",b.max_height+"px");if(a.hasClass(FILTERABLE_CLASS)){show_hide_popupmenu_options(b.popup_menu,"(Show|Hide) filters");if(b.filters_visible){b.filtering_div.show()}}else{show_hide_popupmenu_options(b.popup_menu,"(Show|Hide) filters",false);b.filtering_div.hide()}},set_overview:function(){var a=this.view;if(this.initial_canvas&&this.is_overview){a.overview_close.show();a.overview_viewport.append(this.initial_canvas);a.overview_highlight.show().height(this.initial_canvas.height());a.overview_viewport.height(this.initial_canvas.height()+a.overview_box.height())}$(window).trigger("resize")}});var LabelTrack=function(a,b){this.track_type="LabelTrack";this.hidden=true;Tra
ck.call(this,null,a,b);this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";this.hidden=true;Track.call(this,null,a,a.top_labeltrack);TiledTrack.call(this);this.left_offset=200;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrac
k.prototype,{get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(f,b,l,p){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),o=e.get(0).getContext("2d"),k=f+"_"+b;if(p>PX_PER_CHAR){if(this.data_cache.get(k)===undefined){this.get_data(f,b);return}var n=this.data_cache.get(k);if(n===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*p+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*p-this.left_offset});for(var h=0,m=n.length;h<m;h++){var a=Math.round(h*p),j=Math.round(p/2);o.fillText(n[h],a+this.left_offset+j,10)}l.append(e);return e}this.content_div.css("height","0px")}})
;var LineTrack=function(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Histogram","Line","Filled","Intensity"];this.mode="Histogram";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=80;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={color:"black",min_value:undefined,max_value:undefined,mode:this.mode};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_value=c.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.
min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;a.container_div.find(".yaxislabel").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(round_1000(a.prefs.min_value));var d=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(round_1000(a.prefs.max_value));d.css({position:"absolute",top:"22px",left:"10px"});d.prependTo(a.container_div);e.css({position:"absolute",top:a.height_px+11+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}
})}},draw_tile:function(p,s,c,e){if(this.vertical_range===undefined){return}var t=s*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),w=p+"_"+s;if(this.data_cache.get(w)===undefined){this.get_data(p,s);return}var j=this.data_cache.get(w);if(j===null){return}b.css({position:"absolute",top:0,left:(t-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,u=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();o.fillStyle=this.prefs.color;if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var v,h;for(var q=0,r=data.length;q<r;q++){v=Math.round((data[q][0]-t)*e);h=data[q][1];if(h===null){if(k&&m==="Filled"){o.lineTo(v,d)}k=false;continue}if(h<l){h=l}else{if(h>g){h=g}}if(m==="Histogram"){h=Math.round(d-(h-l)/n*d);o.fillRect(v,h,f,d-h)}else{if(m==="Intensity"){h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("
+h+","+h+","+h+")";o.fillRect(v,0,f,d)}else{h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(v,h)}else{k=true;if(m==="Filled"){o.moveTo(v,d);o.lineTo(v,h)}else{o.moveTo(v,h)}}}}}if(m==="Filled"){if(k){o.lineTo(v,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(n){var a=$("<div />").addClass("form-row");var e="track_"+n+"_color",b=$("<label />").attr("for",e).text("Color:"),c=$("<input />").attr("id",e).attr("name",e).val(this.prefs.color),h="track_"+n+"_minval",m=$("<label></label>").attr("for",h).text("Min value:"),d=(this.prefs.min_value===undefined?"":this.prefs.min_value),l=$("<input></input>").attr("id",h).val(d),k="track_"+n+"_maxval",g=$("<label></label>").attr("for",k).text("Max value:"),j=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",k).val(j);return a.append(m).append(l).append(g).append(f).append(b).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val()
;color=$("#track_"+c+"_color").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value||color!==this.prefs.color){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.prefs.color=color;this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,e,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container,e);TiledTrack.call(this);this.height_px=0;this.container_div.addClass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=2;this.summary_draw_height=30;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(C
ACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"#444",label_color:"black",show_counts:true};if(c.block_color!==undefined){this.prefs.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b="initial";this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution,mode:a.mode},function(c){a.mode_div.show();a.data_cache.set(b,c);a.draw()})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.
inc_slots[a]={};this.inc_slots[a].w_scale=a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==undefined&&!c){var t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(v<=MAX_FEATURE_DEPTH){var p=true;if(this.s_e_by_tile[a][v]!==undefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_tile[a][v]===undefined){this.s_e_by_tile[a][v]=
[]}this.s_e_by_tile[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(r,m,s,b,q,f,h,e){r.textAlign="center";var l=0,p=Math.round(m/2);for(cig_id in h){var k=h[cig_id],d="MIDNSHP"[k[0]],n=k[1];if(d==="H"||d==="S"){l-=n}var g=q+l,v=Math.floor(Math.max(0,(g-s)*m)),j=Math.floor(Math.max(0,(g+n-s)*m));switch(d){case"S":case"H":case"M":var o=f.slice(l,n);if((this.mode==="Pack"||this.mode==="Auto")&&f!==undefined&&m>PX_PER_CHAR){r.fillStyle=this.prefs.block_color;r.fillRect(v+this.left_offset,e+1,j-v,9);r.fillStyle=CONNECTOR_COLOR;for(var t=0,a=o.length;t<a;t++){if(g+t>=s&&g+t<=b){var u=Math.floor(Math.max(0,(g+t-s)*m));r.fillText(o[t],u+this.left_offset+p,e+9)}}}else{r.fillStyle=this.prefs.block_color;r.fillRect(v+this.left_offset,e+4,j-v,3)}break;case"N":r.fillStyle=CONNECTOR_COLOR;r.fillRect(v+this.left_offset,e+5,j-v,1);break;case"D":r.fillStyle="red";r.fillRect(v+this.left_offset,e+4,j-v,3);break;case"P":case"I":break}l+=n}},dr
aw_tile:function(ah,o,s,aw){var N=o*DENSITY*ah,am=(o+1)*DENSITY*ah,M=am-N;var ao=(!this.initial_canvas?"initial":N+"_"+am);var I=this.data_cache.get(ao);var e;if(I===undefined||(this.mode!=="Auto"&&I.dataset_type==="summary_tree")){this.data_queue[[N,am]]=true;this.get_data(N,am);return}var a=Math.ceil(M*aw),S=$("<canvas class='tile'></canvas>"),aj=this.prefs.label_color,l=this.prefs.block_color,r=this.mode,z=25,af=(r==="Squish")||(r==="Dense")&&(r!=="Pack")||(r==="Auto"&&(I.extra_info==="no_detail")),X=this.left_offset,av,D,ax;if(I.dataset_type==="summary_tree"){D=this.summary_draw_height}else{if(r==="Dense"){D=z;ax=10}else{ax=(af?this.vertical_nodetail_px:this.vertical_detail_px);var A=(aw<0.0001?1/view.zoom_res:aw);D=this.incremental_slots(A,I.data,af,r)*ax+z;av=this.inc_slots[A]}}S.css({position:"absolute",top:0,left:(N-this.view.low)*aw-X});S.get(0).width=a+X;S.get(0).height=D;s.parent().css("height",Math.max(this.height_px,D)+"px");var J=S.get(0).getContext("2d");J.fil
lStyle=l;J.font=this.default_font;J.textAlign="right";this.container_div.find(".yaxislabel").remove();if(I.dataset_type=="summary_tree"){var Z=I.data,L=I.max,q=I.avg,b=Math.ceil(I.delta*aw);var p=$("<div />").addClass("yaxislabel").text(L);p.css({position:"absolute",top:"22px",left:"10px"});p.prependTo(this.container_div);for(var aq=0,H=Z.length;aq<H;aq++){var ab=Math.floor((Z[aq][0]-N)*aw);var aa=Z[aq][1];if(!aa){continue}var an=aa/L*this.summary_draw_height;J.fillStyle="black";J.fillRect(ab+X,this.summary_draw_height-an,b,an);if(this.prefs.show_counts&&J.measureText(aa).width<b){J.fillStyle="#bbb";J.textAlign="center";J.fillText(aa,ab+X+(b/2),this.summary_draw_height-5)}}e="Summary";s.append(S);return S}if(I.message){S.css({border:"solid red","border-width":"2px 2px 2px 0px"});J.fillStyle="red";J.textAlign="left";J.fillText(I.message,100+X,ax)}var ae=false;if(I.data.length!=0){ae=true;for(var at=0;at<this.filters.length;at++){if(!this.filters[at].applies_to(I.data[0])){ae=
false}}}if(ae){S.addClass(FILTERABLE_CLASS)}var au=I.data;var ap=0;for(var aq=0,H=au.length;aq<H;aq++){var T=au[aq],R=T[0],ar=T[1],ad=T[2],O=T[3];if(av[R]===undefined){continue}var ac=false;var V;for(var at=0;at<this.filters.length;at++){V=this.filters[at];V.update_attrs(T);if(!V.keep(T)){ac=true;break}}if(ac){continue}if(ar<=am&&ad>=N){var ag=Math.floor(Math.max(0,(ar-N)*aw)),K=Math.ceil(Math.min(a,Math.max(0,(ad-N)*aw))),Y=(r==="Dense"?1:(1+av[R]))*ax;if(I.dataset_type==="bai"){var v=T[4];J.fillStyle=l;if(T[5] instanceof Array){var E=Math.floor(Math.max(0,(T[5][0]-N)*aw)),Q=Math.ceil(Math.min(a,Math.max(0,(T[5][1]-N)*aw))),C=Math.floor(Math.max(0,(T[6][0]-N)*aw)),w=Math.ceil(Math.min(a,Math.max(0,(T[6][1]-N)*aw)));if(T[5][1]>=N&&T[5][0]<=am){this.rect_or_text(J,aw,N,am,T[5][0],T[5][2],v,Y)}if(T[6][1]>=N&&T[6][0]<=am){this.rect_or_text(J,aw,N,am,T[6][0],T[6][2],v,Y)}if(C>Q){J.fillStyle=CONNECTOR_COLOR;J.fillRect(Q+X,Y+5,C-Q,1)}}else{J.fillStyle=l;this.rect_or_text(J,aw,N,am
,ar,O,v,Y)}if(r!=="Dense"&&!af&&ar>N){J.fillStyle=this.prefs.label_color;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(R,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(R,ag-2+X,Y+8)}J.fillStyle=l}}else{if(I.dataset_type==="interval_index"){if(af){J.fillStyle=l;J.fillRect(ag+X,Y+5,K-ag,1)}else{var G=T[4],W=T[5],ai=T[6],h=T[7];var F,ak,P=null,ay=null;if(W&&ai){P=Math.floor(Math.max(0,(W-N)*aw));ay=Math.ceil(Math.min(a,Math.max(0,(ai-N)*aw)))}if(r!=="Dense"&&O!==undefined&&ar>N){J.fillStyle=aj;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(O,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(O,ag-2+X,Y+8)}J.fillStyle=l}if(h){if(G){if(G=="+"){J.fillStyle=RIGHT_STRAND}else{if(G=="-"){J.fillStyle=LEFT_STRAND}}J.fillRect(ag+X,Y,K-ag,10);J.fillStyle=l}for(var ao=0,g=h.length;ao<g;ao++){var u=h[ao],d=Math.floor(Math.max(0,(u[0]-N)*aw)),U=Math.ceil(Math.min(a,Math.max((u[1]-N)*aw)));if(d>U){continue}F=5;ak=3;J.fillRect(d+X,Y+ak,U-d,F);if(P!==un
defined&&!(d>ay||U<P)){F=9;ak=1;var al=Math.max(d,P),B=Math.min(U,ay);J.fillRect(al+X,Y+ak,B-al,F)}}}else{F=9;ak=1;J.fillRect(ag+X,Y+ak,K-ag,F);if(T.strand){if(T.strand=="+"){J.fillStyle=RIGHT_STRAND_INV}else{if(T.strand=="-"){J.fillStyle=LEFT_STRAND_INV}}J.fillRect(ag+X,Y,K-ag,10);J.fillStyle=l}}}}else{if(I.dataset_type==="vcf"){if(af){J.fillStyle=l;J.fillRect(ag+X,Y+5,K-ag,1)}else{var t=T[4],n=T[5],c=T[6];F=9;ak=1;J.fillRect(ag+X,Y,K-ag,F);if(r!=="Dense"&&O!==undefined&&ar>N){J.fillStyle=aj;if(o===0&&ag-J.measureText(O).width<0){J.textAlign="left";J.fillText(O,K+2+X,Y+8)}else{J.textAlign="right";J.fillText(O,ag-2+X,Y+8)}J.fillStyle=l}var m=t+" / "+n;if(ar>N&&J.measureText(m).width<(K-ag)){J.fillStyle="white";J.textAlign="center";J.fillText(m,X+ag+(K-ag)/2,Y+8);J.fillStyle=l}}}}}ap++}}return S},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr
("name",e).val(this.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,e,c){FeatureTrack.call(this,d,b,a,e,c);this.track_type="Rea
dTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
1
0