galaxy-commits
Threads by month
- ----- 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 516a02525898: Move export_history.py script into lib/galaxy/tools/imp_exp so that it's simpler to execute.
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 1285793202 14400
# Node ID 516a02525898381be3a9af8f3ffec205133dbda1
# Parent a9694088cf69e31fbd3f940cca497e1d2e366f75
Move export_history.py script into lib/galaxy/tools/imp_exp so that it's simpler to execute.
--- /dev/null
+++ b/lib/galaxy/tools/imp_exp/export_history.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+"""
+Export a history to an archive file using attribute files.
+
+usage: %prog history_attrs dataset_attrs job_attrs out_file
+ -G, --gzip: gzip archive file
+"""
+
+from galaxy import eggs
+from galaxy.util.json import *
+import optparse, sys, os, tempfile, tarfile
+
+def create_archive( history_attrs_file, datasets_attrs_file, jobs_attrs_file, out_file, gzip=False ):
+ """ Create archive from the given attribute/metadata files and save it to out_file. """
+ tarfile_mode = "w"
+ if gzip:
+ tarfile_mode += ":gz"
+ try:
+
+ history_archive = tarfile.open( out_file, tarfile_mode )
+
+ # Read datasets attributes from file.
+ datasets_attr_in = open( datasets_attrs_file, 'rb' )
+ datasets_attr_str = ''
+ buffsize = 1048576
+ try:
+ while True:
+ datasets_attr_str += datasets_attr_in.read( buffsize )
+ if not datasets_attr_str or len( datasets_attr_str ) % buffsize != 0:
+ break
+ except OverflowError:
+ pass
+ datasets_attr_in.close()
+ datasets_attrs = from_json_string( datasets_attr_str )
+
+ # Add datasets to archive and update dataset attributes.
+ # TODO: security check to ensure that files added are in Galaxy dataset directory?
+ for dataset_attrs in datasets_attrs:
+ dataset_file_name = dataset_attrs[ 'file_name' ] # Full file name.
+ dataset_archive_name = os.path.join( "datasets", os.path.split( dataset_file_name )[-1] )
+ history_archive.add( dataset_file_name, arcname=dataset_archive_name )
+ # Update dataset filename to be archive name.
+ dataset_attrs[ 'file_name' ] = dataset_archive_name
+
+ # Rewrite dataset attributes file.
+ datasets_attrs_out = open( datasets_attrs_file, 'w' )
+ datasets_attrs_out.write( to_json_string( datasets_attrs ) )
+ datasets_attrs_out.close()
+
+ # Finish archive.
+ history_archive.add( history_attrs_file, arcname="history_attrs.txt" )
+ history_archive.add( datasets_attrs_file, arcname="datasets_attrs.txt" )
+ history_archive.add( jobs_attrs_file, arcname="jobs_attrs.txt" )
+ history_archive.close()
+
+ # Status.
+ return 'Created history archive.'
+ except Exception, e:
+ return 'Error creating history archive: %s' % str( e ), sys.stderr
+
+if __name__ == "__main__":
+ # Parse command line.
+ parser = optparse.OptionParser()
+ parser.add_option( '-G', '--gzip', dest='gzip', action="store_true", help='Compress archive using gzip.' )
+ (options, args) = parser.parse_args()
+ gzip = bool( options.gzip )
+ history_attrs, dataset_attrs, job_attrs, out_file = args
+
+ # Create archive.
+ status = create_archive( history_attrs, dataset_attrs, job_attrs, out_file, gzip )
+ print status
--- a/lib/galaxy/tools/imp_exp/__init__.py
+++ b/lib/galaxy/tools/imp_exp/__init__.py
@@ -199,9 +199,10 @@ class JobExportHistoryArchiveWrapper( ob
options = ""
if jeha.compressed:
options = "-G"
- return "%s %s %s %s %s %s" % ( os.path.join( os.path.abspath( os.getcwd() ), "export_history.sh" ), \
- options, history_attrs_filename, datasets_attrs_filename, \
- jobs_attrs_filename, jeha.dataset.file_name )
+ return "python %s %s %s %s %s %s" % (
+ os.path.join( os.path.abspath( os.getcwd() ), "lib/galaxy/tools/imp_exp/export_history.py" ), \
+ options, history_attrs_filename, datasets_attrs_filename, jobs_attrs_filename, \
+ jeha.dataset.file_name )
def cleanup_after_job( self, db_session ):
""" Remove temporary directory and attribute files generated during setup for this job. """
--- a/scripts/export_history.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python
-"""
-Export a history to an archive file using attribute files.
-
-NOTE: This should not be called directly. Use the set_metadata.sh script in Galaxy's
-top level directly.
-
-usage: %prog history_attrs dataset_attrs job_attrs out_file
- -G, --gzip: gzip archive file
- -D, --delete_dir: delete attribute files' directory if operation completed successfully
-"""
-from galaxy import eggs
-import os, pkg_resources, tempfile, tarfile
-pkg_resources.require( "bx-python" )
-import sys, traceback, fileinput
-from galaxy.util.json import *
-from warnings import warn
-from bx.cookbook import doc_optparse
-
-def create_archive( history_attrs_file, datasets_attrs_file, jobs_attrs_file, out_file, gzip=False ):
- """ Create archive from the given attribute/metadata files and save it to out_file. """
- tarfile_mode = "w"
- if gzip:
- tarfile_mode += ":gz"
- try:
-
- history_archive = tarfile.open( out_file, tarfile_mode )
-
- # Read datasets attributes from file.
- datasets_attr_in = open( datasets_attrs_file, 'rb' )
- datasets_attr_str = ''
- buffsize = 1048576
- try:
- while True:
- datasets_attr_str += datasets_attr_in.read( buffsize )
- if not datasets_attr_str or len( datasets_attr_str ) % buffsize != 0:
- break
- except OverflowError:
- pass
- datasets_attr_in.close()
- datasets_attrs = from_json_string( datasets_attr_str )
-
- # Add datasets to archive and update dataset attributes.
- # TODO: security check to ensure that files added are in Galaxy dataset directory?
- for dataset_attrs in datasets_attrs:
- dataset_file_name = dataset_attrs[ 'file_name' ] # Full file name.
- dataset_archive_name = os.path.join( "datasets", os.path.split( dataset_file_name )[-1] )
- history_archive.add( dataset_file_name, arcname=dataset_archive_name )
- # Update dataset filename to be archive name.
- dataset_attrs[ 'file_name' ] = dataset_archive_name
-
- # Rewrite dataset attributes file.
- datasets_attrs_out = open( datasets_attrs_file, 'w' )
- datasets_attrs_out.write( to_json_string( datasets_attrs ) )
- datasets_attrs_out.close()
-
- # Finish archive.
- history_archive.add( history_attrs_file, arcname="history_attrs.txt" )
- history_archive.add( datasets_attrs_file, arcname="datasets_attrs.txt" )
- history_archive.add( jobs_attrs_file, arcname="jobs_attrs.txt" )
- history_archive.close()
-
- # Status.
- return 'Created history archive.'
- except Exception, e:
- return 'Error creating history archive: %s' + str( e ), sys.stderr
-
-if __name__ == "__main__":
- # Parse command line.
- options, args = doc_optparse.parse( __doc__ )
- try:
- gzip = bool( options.gzip )
- delete_dir = bool( options.delete_dir )
- history_attrs, dataset_attrs, job_attrs, out_file = args
- except:
- doc_optparse.exception()
-
- # Create archive.
- status = create_archive( history_attrs, dataset_attrs, job_attrs, out_file, gzip )
- print status
--- a/lib/galaxy/tools/actions/history_imp_exp.py
+++ b/lib/galaxy/tools/actions/history_imp_exp.py
@@ -54,9 +54,6 @@ class ExportHistoryToolAction( ToolActio
job_wrapper = JobExportHistoryArchiveWrapper( job )
cmd_line = job_wrapper.setup_job( trans, jeha, include_hidden=incoming[ 'include_hidden' ], \
include_deleted=incoming[ 'include_deleted' ] )
-
- # Save jeha.
- trans.sa_session.flush()
#
# Add parameters to job_parameter table.
--- a/export_history.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-cd `dirname $0`
-python ./scripts/export_history.py $@
1
0
galaxy-dist commit a9694088cf69: trackster: Move "Add Tracks" button to main pane, UI tweaks for overview
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 1285782969 14400
# Node ID a9694088cf69e31fbd3f940cca497e1d2e366f75
# Parent f60654e287a8534bbf3aea756064ef2d15600f6d
trackster: Move "Add Tracks" button to main pane, UI tweaks for overview
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -43,30 +43,12 @@
<div style="float:left;" id="title"></div><a class="panel-header-button right-float" href="${h.url_for( controller='visualization', action='list' )}">Close</a><a id="save-button" class="panel-header-button right-float" href="javascript:void(0);">Save</a>
- <a id="refresh-button" class="panel-header-button right-float" href="javascript:void(0);" onclick="view.update_options();return false;">Refresh</a>
+ <a id="add-track" class="panel-header-button right-float" href="javascript:void(0);">Add Tracks</a></div></div></%def>
-<%def name="right_panel()">
- <div class="unified-panel-header" unselectable="on">
- <div class="unified-panel-header-inner">Configuration
- <a id="add-track" class="panel-header-button right-float" href="javascript:void(0);">Add Tracks</a>
- </div>
- </div>
- <form action="#" onsubmit="view.update_options();return false;">
- <div id="show-hide-move">
- <div id="no-tracks" class="warningmessage" style="margin: 5px; display:none;">
- There are currently no tracks in this browser. Add tracks via the button above.
- </div>
- <ul id="sortable-ul"></ul>
- </div>
- <input type="submit" id="refresh-button" value="Refresh" style="display:none" />
- </form>
-
-</%def>
-
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jquery.event.drag", "jquery.autocomplete", "jquery.mousewheel", "trackster", "ui.core", "ui.sortable" )}
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -383,7 +383,7 @@ var View = function( container, chrom, t
var left_px = ( this.low / (this.max_high - this.max_low) ) * this.overview_viewport.width();
var width_px = (this.high - this.low)/(this.max_high - this.max_low) * this.overview_viewport.width();
- this.overview_box.css({ left: left_px, width: Math.max(12, width_px) - 2 }).show();
+ this.overview_box.css({ left: left_px, width: Math.max(12, width_px) }).show();
if (this.overview_highlight) {
this.overview_highlight.css({ left: left_px, width: width_px });
}
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -6,12 +6,12 @@
.nav-controls a{padding:0 0.4em;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0px 10px;}
-.intro{position:absolute;top:50%;left:30%;color:#555;font-size:16px;}
+.intro{margin-top:200px;margin-left:auto;margin-right:auto;color:#555;text-align:center;font-size:16px;}
.overview{width:100%;margin:0px;color:white;}
.overview-viewport{position:relative;height:14px;background:white;border-bottom:solid gray 1px;margin:0;}
.overview-highlight{opacity:0.5;top:0px;position:absolute;z-index:100;border-style:solid;border-color:#6a6;border-width:0px 1px;}
-.overview-boxback{width:100%;bottom:0px;z-index:50;position:absolute;height:14px;background:#F8F8F8;}
-.overview-box{opacity:0.5;bottom:0px;z-index:100;position:absolute;margin-top:0px;height:14px;background:#cfc url(../images/visualization/draggable_horizontal.png) center center no-repeat;border-style:solid;border-color:#6a6;border-width:0px 2px;}
+.overview-boxback{width:100%;bottom:0px;z-index:50;position:absolute;height:14px;background:#eee;}
+.overview-box{opacity:0.5;bottom:0px;z-index:100;position:absolute;margin-top:0px;height:14px;background:#cfc url(../images/visualization/draggable_horizontal.png) center center no-repeat;border-style:solid;border-color:#6a6;border-width:0px 1px;}
.viewport-canvas{width:100%;height:100px;}
.yaxislabel{color:#777;}
.line-track .track-content{border-top:1px solid #ddd;border-bottom:1px solid #ddd;}
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -35,10 +35,11 @@
margin: 0px 10px;
}
.intro {
- position: absolute;
- top: 50%;
- left: 30%;
+ margin-top: 200px;
+ margin-left: auto;
+ margin-right: auto;
color: #555;
+ text-align: center;
font-size: 16px;
}
.overview {
@@ -70,7 +71,7 @@
z-index: 50;
position: absolute;
height: 14px;
- background: #F8F8F8;
+ background: #eee;
}
.overview-box {
opacity: 0.5;
@@ -82,7 +83,7 @@
background: #cfc url(../images/visualization/draggable_horizontal.png) center center no-repeat;
border-style: solid;
border-color: #6a6;
- border-width: 0px 2px;
+ border-width: 0px 1px;
}
.viewport-canvas {
width: 100%;
--- 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=100,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...",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/strand_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,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_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").hide().appendTo(c);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide().appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);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_box_background=$("<div/>").addClass("overview-boxback").app
endTo(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();return 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.hi
de();a.chrom_select.hide();a.nav_input.css("display","inline-block");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 ReferenceTrack(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.content_div.hide();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.viewport_container.bind("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.active=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.active){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",f
unction(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();c.content_div.hide()}else{c.intro_div.hide();c.content_div.show()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.reset();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.overview_viewport.find("canvas").remove();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;i
f(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).remove()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport_container.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".ya
xislabel").remove()},redraw:function(h){var d=this.high-this.low,b=this.low,f=this.high;if(b<this.max_low){b=this.max_low}if(f>this.max_high){f=this.max_high}if(this.high!==0&&d<this.min_separation){f=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(f);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 e=(this.low/(this.max_high-this.max_low))*this.overview_viewport.width();var g=(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width();this.overview_box.css({left:e,width:Math.max(12,g)-2}).show();if(this.overview_highlight){this.overview_highlight.css({left:e,width:g})}this.update_location(this.low,this.high);if(!h){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;c++){thi
s.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()}});var Track=function(b,a,c){this.name=b;this.parent_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.container_div=$("<div />").addClass("track");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name)}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)}e
lse{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 track 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.track
s[j].is_overview=false}}};b["Edit configuration"]=function(){show_modal("Configure Track",d.gen_options(d.track_id),{Cancel:function(){hide_modal()},OK:function(){d.update_options(d.track_id);hide_modal()}})};b.Remove=function(){c.remove_track(d);if(c.num_tracks===0){$("#no-tracks").show()}};make_popupmenu(d.name_div,b)};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_div.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,
k,j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var l=tile_element.get(0).getContext("2d");var j=c.initial_canvas.get(0).getContext("2d");var k=l.getImageData(0,0,l.canvas.width,l.canvas.height);j.putImageData(k,0,0);c.set_overview()}c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)},set_overview:function(){var a=this.view;a.overview_viewport.height(a.default_overview_height);a.overview_box.height(a.default_overview_height);if(this.initial_canvas&&this.is_overview){if(!a.overview_highlight){a.overview_highlight=$("<div />").addClass("overview-highlight").appendTo(a.overview_viewport)}a.overview_viewport.append(this.initial_canvas);a.overview_highlight.height(this.initial_canvas.height());a.overview_vie
wport.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.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContex
t("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,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o-this.left_offset});for(var h=0,l=m.le
ngth;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}this.content_div.css("height","0px")}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Line","Filled","Intensity"];this.mode="Line";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={min_value:undefined,max_value:undefined,mode:"Line"};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;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").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:"relative",top:"32px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+32+"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,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-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,t=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRe
ct(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(k){var a=$("<div />").addClass("form-row");var e="track_"+k+"_minval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),j=$("<input></input>").attr("id",e).val(b),g="track_"+k+"_maxval",d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("<input></input>").attr("id",g).val(f);return a.append(h).append(j).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.m
in_value=parseFloat(a);this.prefs.max_value=parseFloat(b);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,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container);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=20;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_FEATURE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"black",label_color:"black",show_counts:true};if(c.block_colo
r!==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(true){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(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.r
ound(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(aa,l,o,an){var H=l*DENSITY*aa,ag=(l+1)*DENSITY*aa,G=ag-H;var ah=(!this.initial_canvas?"initial":H+"_"+ag);var C=this.data_cache.get(ah);var d;if(C===undefined||(this.mode!=="Auto"&&C.dataset_type==="summary_tree")){this.data_queue[[H,ag]]=true;this.get_data(H,ag);return}var a=Math.ceil(G*an),O=$("<canvas class='tile'></canvas>"),ac=this.prefs.label_color,g=this.prefs.block_color,n=this.mode,r=25,Y=(n==="Squish")||(n==="Dense")&&(n!=="Pack")||(n==="Auto"&&(C.extra_info==="no_detail")),S=this.left_offset,am,v,ao;if(C.dataset_type==="summary_tree"){v=this.summary_draw_height}else{if(n==="Dense"){v=r;ao=10}
else{ao=(Y?this.vertical_nodetail_px:this.vertical_detail_px);var s=(an<0.0001?1/view.zoom_res:an);v=this.incremental_slots(s,C.data,Y,n)*ao+r;am=this.inc_slots[s]}}O.css({position:"absolute",top:0,left:(H-this.view.low)*an-S});O.get(0).width=a+S;O.get(0).height=v;o.parent().css("height",Math.max(this.height_px,v)+"px");var D=O.get(0).getContext("2d");D.fillStyle=g;D.font=this.default_font;D.textAlign="right";if(C.dataset_type=="summary_tree"){var N,K=55,af=255-K,h=af*2/3,U=C.data,F=C.max,m=C.avg,b=Math.ceil(C.delta*an);for(var aj=0,B=U.length;aj<B;aj++){var W=Math.floor((U[aj][0]-H)*an);var V=U[aj][1];if(!V){continue}N=Math.floor(af-(V/F)*af);D.fillStyle="rgb("+N+","+N+","+N+")";D.fillRect(W+S,0,b,this.summary_draw_height);if(this.prefs.show_counts&&D.measureText(V).width<b){if(N>h){D.fillStyle="black"}else{D.fillStyle="#ddd"}D.textAlign="center";D.fillText(V,W+S+(b/2),12)}}d="Summary";o.append(O);return O}if(C.message){O.css({border:"solid red","border-width":"2px 2px 2px
0px"});D.fillStyle="red";D.textAlign="left";D.fillText(C.message,100+S,ao)}var al=C.data;var ai=0;for(var aj=0,B=al.length;aj<B;aj++){var P=al[aj],M=P[0],ak=P[1],X=P[2],I=P[3];if(ak<=ag&&X>=H){var Z=Math.floor(Math.max(0,(ak-H)*an)),E=Math.ceil(Math.min(a,Math.max(0,(X-H)*an))),T=(n==="Dense"?1:(1+am[M]))*ao;if(C.dataset_type==="bai"){D.fillStyle=g;if(P[4] instanceof Array){var w=Math.floor(Math.max(0,(P[4][0]-H)*an)),L=Math.ceil(Math.min(a,Math.max(0,(P[4][1]-H)*an))),u=Math.floor(Math.max(0,(P[5][0]-H)*an)),q=Math.ceil(Math.min(a,Math.max(0,(P[5][1]-H)*an)));if(P[4][1]>=H&&P[4][0]<=ag){this.rect_or_text(D,an,H,ag,P[4][0],P[4][2],w+S,L-w,T)}if(P[5][1]>=H&&P[5][0]<=ag){this.rect_or_text(D,an,H,ag,P[5][0],P[5][2],u+S,q-u,T)}if(u>L){D.fillStyle="#999";D.fillRect(L+S,T+5,u-L,1)}}else{D.fillStyle=g;this.rect_or_text(D,an,H,ag,ak,I,Z+S,E-Z,T)}if(n!=="Dense"&&!Y&&ak>H){D.fillStyle=this.prefs.label_color;if(l===0&&Z-D.measureText(I).width<0){D.textAlign="left";D.fillText(M,E+2+S,T+
8)}else{D.textAlign="right";D.fillText(M,Z-2+S,T+8)}D.fillStyle=g}}else{if(C.dataset_type==="interval_index"){if(Y){D.fillStyle=g;D.fillRect(Z+S,T+5,E-Z,1)}else{var A=P[4],R=P[5],ab=P[6],f=P[7];var z,ad,J=null,ap=null;if(R&&ab){J=Math.floor(Math.max(0,(R-H)*an));ap=Math.ceil(Math.min(a,Math.max(0,(ab-H)*an)))}if(n!=="Dense"&&I!==undefined&&ak>H){D.fillStyle=ac;if(l===0&&Z-D.measureText(I).width<0){D.textAlign="left";D.fillText(I,E+2+S,T+8)}else{D.textAlign="right";D.fillText(I,Z-2+S,T+8)}D.fillStyle=g}if(f){if(A){if(A=="+"){D.fillStyle=RIGHT_STRAND}else{if(A=="-"){D.fillStyle=LEFT_STRAND}}D.fillRect(Z+S,T,E-Z,10);D.fillStyle=g}for(var ah=0,e=f.length;ah<e;ah++){var p=f[ah],c=Math.floor(Math.max(0,(p[0]-H)*an)),Q=Math.ceil(Math.min(a,Math.max((p[1]-H)*an)));if(c>Q){continue}z=5;ad=3;D.fillRect(c+S,T+ad,Q-c,z);if(J!==undefined&&!(c>ap||Q<J)){z=9;ad=1;var ae=Math.max(c,J),t=Math.min(Q,ap);D.fillRect(ae+S,T+ad,t-ae,z)}}}else{z=9;ad=1;D.fillRect(Z+S,T+ad,E-Z,z);if(P.strand){if(P.
strand=="+"){D.fillStyle=RIGHT_STRAND_INV}else{if(P.strand=="-"){D.fillStyle=LEFT_STRAND_INV}}D.fillRect(Z+S,T,E-Z,10);D.fillStyle=g}}}}}ai++}}o.append(O);return O},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:selecte
d").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,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
+var DENSITY=200,FEATURE_LEVELS=10,MAX_FEATURE_DEPTH=100,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...",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/strand_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,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.num_tracks=0;this.track_id_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").hide().appendTo(c);this.intro_div=$("<div/>").addClass("intro").text("Select a chrom from the dropdown below").hide().appendTo(c);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);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_box_background=$("<div/>").addClass("overview-boxback").app
endTo(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();return 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.hi
de();a.chrom_select.hide();a.nav_input.css("display","inline-block");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 ReferenceTrack(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.content_div.hide();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.viewport_container.bind("dragstart",function(d){this.original_low=a.low;this.current_height=d.clientY;this.current_x=d.offsetX;this.active=(d.clientX<a.viewport_container.width()-16)?true:false}).bind("drag",function(g){if(!this.active){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",f
unction(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();c.content_div.hide()}else{c.intro_div.hide();c.content_div.show()}c.chrom_select.val(c.chrom);c.max_high=e.len;c.reset();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.overview_viewport.find("canvas").remove();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;i
f(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).remove()});delete this.tracks[this.tracks.indexOf(a)];this.num_tracks-=1},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport_container.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".ya
xislabel").remove()},redraw:function(h){var d=this.high-this.low,b=this.low,f=this.high;if(b<this.max_low){b=this.max_low}if(f>this.max_high){f=this.max_high}if(this.high!==0&&d<this.min_separation){f=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(f);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 e=(this.low/(this.max_high-this.max_low))*this.overview_viewport.width();var g=(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width();this.overview_box.css({left:e,width:Math.max(12,g)}).show();if(this.overview_highlight){this.overview_highlight.css({left:e,width:g})}this.update_location(this.low,this.high);if(!h){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;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()}});var Track=function(b,a,c){this.name=b;this.parent_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.container_div=$("<div />").addClass("track");if(!this.hidden){this.header_div=$("<div class='track-header' />").appendTo(this.container_div);this.name_div=$("<div class='menubutton popup' />").appendTo(this.header_div);this.name_div.text(this.name)}this.content_div=$("<div class='track-content'>").appendTo(this.container_div);this.parent_e
lement.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)}els
e{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 track 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(){show_modal("Configure Track",d.gen_options(d.track_id),{Cancel:function(){hide_modal()},OK:function(){d.update_options(d.track_id);hide_modal()}})};b.Remove=function(){c.remove_track(d);if(c.num_tracks===0){$("#no-tracks").show()}};make_popupmenu(d.name_div,b)};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_div.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,k,
j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){if(!c.initial_canvas){c.initial_canvas=$(tile_element).clone();var l=tile_element.get(0).getContext("2d");var j=c.initial_canvas.get(0).getContext("2d");var k=l.getImageData(0,0,l.canvas.width,l.canvas.height);j.putImageData(k,0,0);c.set_overview()}c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)},set_overview:function(){var a=this.view;a.overview_viewport.height(a.default_overview_height);a.overview_box.height(a.default_overview_height);if(this.initial_canvas&&this.is_overview){if(!a.overview_highlight){a.overview_highlight=$("<div />").addClass("overview-highlight").appendTo(a.overview_viewport)}a.overview_viewport.append(this.initial_canvas);a.overview_highlight.height(this.initial_canvas.height());a.overview_viewp
ort.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.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,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){this.content_div.css("height","0px");return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o-this.left_offset});for(var h=0,l=m.leng
th;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}this.content_div.css("height","0px")}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";this.display_modes=["Line","Filled","Intensity"];this.mode="Line";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={min_value:undefined,max_value:undefined,mode:"Line"};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_v
alue))){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;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").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:"relative",top:"32px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+32+"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},s
uccess: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,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-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,t=this.total_frequency,d=this.height_px,m=this.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect
(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(k){var a=$("<div />").addClass("form-row");var e="track_"+k+"_minval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),j=$("<input></input>").attr("id",e).val(b),g="track_"+k+"_maxval",d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("<input></input>").attr("id",g).val(f);return a.append(h).append(j).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.min
_value=parseFloat(a);this.prefs.max_value=parseFloat(b);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,c){this.track_type="FeatureTrack";this.display_modes=["Auto","Dense","Squish","Pack"];Track.call(this,d,b,b.viewport_container);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=20;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_FEATURE);this.data_cache=new Cache(20);this.left_offset=200;this.prefs={block_color:"black",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(true){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(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.rou
nd(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(aa,l,o,an){var H=l*DENSITY*aa,ag=(l+1)*DENSITY*aa,G=ag-H;var ah=(!this.initial_canvas?"initial":H+"_"+ag);var C=this.data_cache.get(ah);var d;if(C===undefined||(this.mode!=="Auto"&&C.dataset_type==="summary_tree")){this.data_queue[[H,ag]]=true;this.get_data(H,ag);return}var a=Math.ceil(G*an),O=$("<canvas class='tile'></canvas>"),ac=this.prefs.label_color,g=this.prefs.block_color,n=this.mode,r=25,Y=(n==="Squish")||(n==="Dense")&&(n!=="Pack")||(n==="Auto"&&(C.extra_info==="no_detail")),S=this.left_offset,am,v,ao;if(C.dataset_type==="summary_tree"){v=this.summary_draw_height}else{if(n==="Dense"){v=r;ao=10}el
se{ao=(Y?this.vertical_nodetail_px:this.vertical_detail_px);var s=(an<0.0001?1/view.zoom_res:an);v=this.incremental_slots(s,C.data,Y,n)*ao+r;am=this.inc_slots[s]}}O.css({position:"absolute",top:0,left:(H-this.view.low)*an-S});O.get(0).width=a+S;O.get(0).height=v;o.parent().css("height",Math.max(this.height_px,v)+"px");var D=O.get(0).getContext("2d");D.fillStyle=g;D.font=this.default_font;D.textAlign="right";if(C.dataset_type=="summary_tree"){var N,K=55,af=255-K,h=af*2/3,U=C.data,F=C.max,m=C.avg,b=Math.ceil(C.delta*an);for(var aj=0,B=U.length;aj<B;aj++){var W=Math.floor((U[aj][0]-H)*an);var V=U[aj][1];if(!V){continue}N=Math.floor(af-(V/F)*af);D.fillStyle="rgb("+N+","+N+","+N+")";D.fillRect(W+S,0,b,this.summary_draw_height);if(this.prefs.show_counts&&D.measureText(V).width<b){if(N>h){D.fillStyle="black"}else{D.fillStyle="#ddd"}D.textAlign="center";D.fillText(V,W+S+(b/2),12)}}d="Summary";o.append(O);return O}if(C.message){O.css({border:"solid red","border-width":"2px 2px 2px 0p
x"});D.fillStyle="red";D.textAlign="left";D.fillText(C.message,100+S,ao)}var al=C.data;var ai=0;for(var aj=0,B=al.length;aj<B;aj++){var P=al[aj],M=P[0],ak=P[1],X=P[2],I=P[3];if(ak<=ag&&X>=H){var Z=Math.floor(Math.max(0,(ak-H)*an)),E=Math.ceil(Math.min(a,Math.max(0,(X-H)*an))),T=(n==="Dense"?1:(1+am[M]))*ao;if(C.dataset_type==="bai"){D.fillStyle=g;if(P[4] instanceof Array){var w=Math.floor(Math.max(0,(P[4][0]-H)*an)),L=Math.ceil(Math.min(a,Math.max(0,(P[4][1]-H)*an))),u=Math.floor(Math.max(0,(P[5][0]-H)*an)),q=Math.ceil(Math.min(a,Math.max(0,(P[5][1]-H)*an)));if(P[4][1]>=H&&P[4][0]<=ag){this.rect_or_text(D,an,H,ag,P[4][0],P[4][2],w+S,L-w,T)}if(P[5][1]>=H&&P[5][0]<=ag){this.rect_or_text(D,an,H,ag,P[5][0],P[5][2],u+S,q-u,T)}if(u>L){D.fillStyle="#999";D.fillRect(L+S,T+5,u-L,1)}}else{D.fillStyle=g;this.rect_or_text(D,an,H,ag,ak,I,Z+S,E-Z,T)}if(n!=="Dense"&&!Y&&ak>H){D.fillStyle=this.prefs.label_color;if(l===0&&Z-D.measureText(I).width<0){D.textAlign="left";D.fillText(M,E+2+S,T+8)
}else{D.textAlign="right";D.fillText(M,Z-2+S,T+8)}D.fillStyle=g}}else{if(C.dataset_type==="interval_index"){if(Y){D.fillStyle=g;D.fillRect(Z+S,T+5,E-Z,1)}else{var A=P[4],R=P[5],ab=P[6],f=P[7];var z,ad,J=null,ap=null;if(R&&ab){J=Math.floor(Math.max(0,(R-H)*an));ap=Math.ceil(Math.min(a,Math.max(0,(ab-H)*an)))}if(n!=="Dense"&&I!==undefined&&ak>H){D.fillStyle=ac;if(l===0&&Z-D.measureText(I).width<0){D.textAlign="left";D.fillText(I,E+2+S,T+8)}else{D.textAlign="right";D.fillText(I,Z-2+S,T+8)}D.fillStyle=g}if(f){if(A){if(A=="+"){D.fillStyle=RIGHT_STRAND}else{if(A=="-"){D.fillStyle=LEFT_STRAND}}D.fillRect(Z+S,T,E-Z,10);D.fillStyle=g}for(var ah=0,e=f.length;ah<e;ah++){var p=f[ah],c=Math.floor(Math.max(0,(p[0]-H)*an)),Q=Math.ceil(Math.min(a,Math.max((p[1]-H)*an)));if(c>Q){continue}z=5;ad=3;D.fillRect(c+S,T+ad,Q-c,z);if(J!==undefined&&!(c>ap||Q<J)){z=9;ad=1;var ae=Math.max(c,J),t=Math.min(Q,ap);D.fillRect(ae+S,T+ad,t-ae,z)}}}else{z=9;ad=1;D.fillRect(Z+S,T+ad,E-Z,z);if(P.strand){if(P.st
rand=="+"){D.fillStyle=RIGHT_STRAND_INV}else{if(P.strand=="-"){D.fillStyle=LEFT_STRAND_INV}}D.fillRect(Z+S,T,E-Z,10);D.fillStyle=g}}}}}ai++}}o.append(O);return O},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,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
1
0
galaxy-dist commit c4441790bfaa: Fixed naming of the library selectfield for sample operations
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 1290028751 18000
# Node ID c4441790bfaae82d4e84ad11ec58cea7715ea6ef
# Parent 29227c9c599292f7608e61cdd4b2be424b7a7bfc
Fixed naming of the library selectfield for sample operations
Fixed the broken popup menu in the data transfer grid
Fixed the missing required/optional field info in the request form
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1584,7 +1584,7 @@ class FormDefinition( object ):
if field[ 'helptext' ]:
helptext='%s (%s)' % ( field[ 'helptext' ], req )
else:
- helptext = ''
+ helptext = '(%s)' % req
widgets.append( dict( label=field[ 'label' ],
widget=field_widget,
helptext=helptext ) )
--- a/lib/galaxy/web/controllers/requests_common.py
+++ b/lib/galaxy/web/controllers/requests_common.py
@@ -185,7 +185,7 @@ class RequestsCommon( BaseController, Us
if request_type is not None or status == 'error':
# Either the user selected a request_type or an error exists on the form.
if is_admin:
- if not user_id_encoded:
+ if not user_id_encoded and user:
selected_user_id = trans.security.encode_id( user.id )
else:
selected_user_id = user_id
@@ -465,7 +465,7 @@ class RequestsCommon( BaseController, Us
sample_copy = self.__build_copy_sample_select_field( trans, displayable_sample_widgets )
libraries_select_field, folders_select_field = self.__build_library_and_folder_select_fields( trans,
request.user,
- 0,
+ 'sample_operation',
libraries,
None,
**kwd )
@@ -810,7 +810,6 @@ class RequestsCommon( BaseController, Us
# See if the user has selected a sample to copy.
copy_sample_index = int( params.get( 'copy_sample_index', -1 ) )
for index in range( num_samples_to_add ):
- id_index = len( displayable_sample_widgets ) + 1
if copy_sample_index != -1:
# The user has selected a sample to copy.
library_id = displayable_sample_widgets[ copy_sample_index][ 'library_select_field' ].get_selected( return_value=True )
@@ -826,7 +825,7 @@ class RequestsCommon( BaseController, Us
# Build the library_select_field and folder_select_field for the new sample being added.
library_select_field, folder_select_field = self.__build_library_and_folder_select_fields( trans,
user=request.user,
- sample_index=id_index,
+ sample_index=len( displayable_sample_widgets ),
libraries=libraries,
sample=None,
library_id=library_id,
@@ -1080,13 +1079,8 @@ class RequestsCommon( BaseController, Us
action='update_request_state',
request_id=trans.security.encode_id( request.id ) ) )
elif sample_operation == trans.model.Sample.bulk_operations.SELECT_LIBRARY:
- # TODO: fix the code so that the sample_operation_select_field does not use
- # sample_0_library_id as it's name. it should use something like sample_operation_library_id
- # and sample_operation_folder_id because the name sample_0_library_id should belong to the
- # first sample since all other form field values are named like this. The library and folder
- # are skewed to be named +1 resulting in the forced use of id_index everywhere...
- library_id = params.get( 'sample_0_library_id', 'none' )
- folder_id = params.get( 'sample_0_folder_id', 'none' )
+ library_id = params.get( 'sample_operation_library_id', 'none' )
+ folder_id = params.get( 'sample_operation_folder_id', 'none' )
library, folder = self.__get_library_and_folder( trans, library_id, folder_id )
for sample_index in range( len( samples ) ):
current_sample = samples[ sample_index ]
@@ -1254,15 +1248,14 @@ class RequestsCommon( BaseController, Us
if sample_operation != 'none':
# The sample_operatin param has a value other than 'none', and a specified
# set of samples was received.
- library_id = util.restore_text( params.get( 'sample_0_library_id', 'none' ) )
- folder_id = util.restore_text( params.get( 'sample_0_folder_id', 'none' ) )
+ library_id = util.restore_text( params.get( 'sample_operation_library_id', 'none' ) )
+ folder_id = util.restore_text( params.get( 'sample_operation_folder_id', 'none' ) )
# Build the list of widgets which will be used to render each sample row on the request page
if not request:
return sample_widgets
libraries = trans.app.security_agent.get_accessible_libraries( trans, request.user )
# Build the list if sample widgets, populating the values from kwd.
for index, sample in enumerate( samples ):
- id_index = index + 1
if sample is None:
# Use the sample from the request object since it will not have updated values from kwd.
sample = request.samples[ index ]
@@ -1277,10 +1270,10 @@ class RequestsCommon( BaseController, Us
sample_id = None
name = util.restore_text( params.get( 'sample_%i_name' % index, sample.name ) )
bar_code = util.restore_text( params.get( 'sample_%i_bar_code' % index, sample.bar_code ) )
- library_id = util.restore_text( params.get( 'sample_%i_library_id' % id_index, '' ) )
+ library_id = util.restore_text( params.get( 'sample_%i_library_id' % index, '' ) )
if not library_id and sample.library:
library_id = trans.security.encode_id( sample.library.id )
- folder_id = util.restore_text( params.get( 'sample_%i_folder_id' % id_index, '' ) )
+ folder_id = util.restore_text( params.get( 'sample_%i_folder_id' % index, '' ) )
if not folder_id and sample.folder:
folder_id = trans.security.encode_id( sample.folder.id )
library, folder = self.__get_library_and_folder( trans, library_id, folder_id )
@@ -1290,7 +1283,7 @@ class RequestsCommon( BaseController, Us
field_values.append( field_value )
library_select_field, folder_select_field = self.__build_library_and_folder_select_fields( trans=trans,
user=request.user,
- sample_index=id_index,
+ sample_index=index,
libraries=libraries,
sample=sample,
library_id=library_id,
@@ -1311,17 +1304,16 @@ class RequestsCommon( BaseController, Us
name = util.restore_text( params.get( 'sample_%i_name' % index, '' ) )
if not name:
break
- id_index = index + 1
bar_code = util.restore_text( params.get( 'sample_%i_bar_code' % index, '' ) )
- library_id = util.restore_text( params.get( 'sample_%i_library_id' % id_index, '' ) )
- folder_id = util.restore_text( params.get( 'sample_%i_folder_id' % id_index, '' ) )
+ library_id = util.restore_text( params.get( 'sample_%i_library_id' % index, '' ) )
+ folder_id = util.restore_text( params.get( 'sample_%i_folder_id' % index, '' ) )
library, folder = self.__get_library_and_folder( trans, library_id, folder_id )
field_values = []
for field_index in range( len( request.type.sample_form.fields ) ):
field_values.append( util.restore_text( params.get( 'sample_%i_field_%i' % ( index, field_index ), '' ) ) )
library_select_field, folder_select_field = self.__build_library_and_folder_select_fields( trans=trans,
user=request.user,
- sample_index=id_index,
+ sample_index=index,
libraries=libraries,
sample=None,
library_id=library_id,
@@ -1376,8 +1368,13 @@ class RequestsCommon( BaseController, Us
# not have ACCESS permissions associated with them (only LIBRARY_ADD, LIBRARY_MODIFY, LIBRARY_MANAGE), so all folders will
# be present in the folder_select_field for each library selected.
params = util.Params( kwd )
- library_select_field_name= "sample_%i_library_id" % sample_index
- folder_select_field_name = "sample_%i_folder_id" % sample_index
+ if sample_index == 'sample_operation':
+ # build the library selection widget for the bulk sample operation
+ library_select_field_name= "sample_operation_library_id"
+ folder_select_field_name = "sample_operation_folder_id"
+ else:
+ library_select_field_name= "sample_%i_library_id" % sample_index
+ folder_select_field_name = "sample_%i_folder_id" % sample_index
if not library_id:
library_id = params.get( library_select_field_name, None )
if not folder_id:
--- a/lib/galaxy/web/controllers/requests_admin.py
+++ b/lib/galaxy/web/controllers/requests_admin.py
@@ -127,17 +127,14 @@ class DataTransferGrid( grids.Grid ):
operations = [
grids.GridOperation( "Transfer",
allow_multiple=True,
- condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ),
- url_args=dict( webapp="galaxy" ) ),
+ condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ) ),
grids.GridOperation( "Rename",
allow_multiple=True,
allow_popup=False,
- condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ),
- url_args=dict( webapp="galaxy" ) ),
+ condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ) ),
grids.GridOperation( "Delete",
allow_multiple=True,
- condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ),
- url_args=dict( webapp="galaxy" ) )
+ condition=( lambda item: item.status in [ model.SampleDataset.transfer_status.NOT_STARTED ] ) )
]
def apply_query_filter( self, trans, query, **kwd ):
sample_id = kwd.get( 'sample_id', None )
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -1571,10 +1571,9 @@ class TwillTestCase( unittest.TestCase )
self.check_page_for_string( check_str )
for sample_index, ( sample_name, target_library_info, sample_field_values ) in enumerate( sample_value_tuples ):
tc.fv( "1", "sample_%i_name" % sample_index, sample_name )
- lib_widget_index = sample_index + 1
- tc.fv( "1", "sample_%i_library_id" % lib_widget_index, target_library_info[ 'library' ] )
- self.refresh_form( "sample_%i_library_id" % lib_widget_index, target_library_info[ 'library' ] )
- tc.fv( "1", "sample_%i_folder_id" % lib_widget_index, target_library_info[ 'folder' ] )
+ tc.fv( "1", "sample_%i_library_id" % sample_index, target_library_info[ 'library' ] )
+ self.refresh_form( "sample_%i_library_id" % sample_index, target_library_info[ 'library' ] )
+ tc.fv( "1", "sample_%i_folder_id" % sample_index, target_library_info[ 'folder' ] )
for field_index, field_value in enumerate( sample_field_values ):
tc.fv( "1", "sample_%i_field_%i" % ( sample_index, field_index ), field_value )
# Do not click on Add sample button when all the sample have been added
@@ -1592,10 +1591,9 @@ class TwillTestCase( unittest.TestCase )
self.check_page_for_string( check_str )
for sample_index, ( sample_name, target_library_info, sample_field_values ) in enumerate( sample_value_tuples ):
tc.fv( "1", "sample_%i_name" % sample_index, sample_name )
- lib_widget_index = sample_index + 1
- tc.fv( "1", "sample_%i_library_id" % lib_widget_index, target_library_info[ 'library' ] )
- self.refresh_form( "sample_%i_library_id" % lib_widget_index, target_library_info[ 'library' ] )
- tc.fv( "1", "sample_%i_folder_id" % lib_widget_index, target_library_info[ 'folder' ] )
+ tc.fv( "1", "sample_%i_library_id" % sample_index, target_library_info[ 'library' ] )
+ self.refresh_form( "sample_%i_library_id" % sample_index, target_library_info[ 'library' ] )
+ tc.fv( "1", "sample_%i_folder_id" % sample_index, target_library_info[ 'folder' ] )
for field_index, field_value in enumerate( sample_field_values ):
tc.fv( "1", "sample_%i_field_%i" % ( sample_index, field_index ), field_value )
tc.submit( "save_samples_button" )
@@ -1631,6 +1629,7 @@ class TwillTestCase( unittest.TestCase )
for sample_id in sample_ids:
tc.fv( "1", "select_sample_%i" % sample_id, True )
tc.fv( "1", "sample_operation", 'Change state' )
+ # refresh on change to show the sample states selectfield
self.refresh_form( "sample_operation", 'Change state' )
self.check_page_for_string( "Change current state" )
tc.fv( "1", "sample_state_id", new_sample_state_id )
@@ -1646,12 +1645,15 @@ class TwillTestCase( unittest.TestCase )
for sample_id in sample_ids:
tc.fv( "1", "select_sample_%i" % sample_id, True )
tc.fv( "1", "sample_operation", 'Select data library and folder' )
+ # refresh on change to show the data libraries selectfield
self.refresh_form( "sample_operation", 'Select data library and folder' )
self.check_page_for_string( "Select data library:" )
- tc.fv( "1", "sample_0_library_id", new_library_id )
- self.refresh_form( "sample_0_library_id", new_library_id )
+ tc.fv( "1", "sample_operation_library_id", new_library_id )
+ # refresh on change to show the selectfield with the list of
+ # folders in the selected data library above
+ self.refresh_form( "sample_operation_library_id", new_library_id )
self.check_page_for_string( "Select folder:" )
- tc.fv( "1", "sample_0_folder_id", new_folder_id )
+ tc.fv( "1", "sample_operation_folder_id", new_folder_id )
tc.submit( "save_samples_button" )
for check_str in strings_displayed_after_submit:
self.check_page_for_string( check_str )
--- a/templates/requests/common/view_request.mako
+++ b/templates/requests/common/view_request.mako
@@ -72,7 +72,7 @@
<div class="toolFormBody"><div class="form-row"><label>Current state:</label>
- ${request.state}
+ <a href="${h.url_for( controller='requests_common', action='view_request_history', cntrller=cntrller, id=trans.security.encode_id( request.id ) )}">${request.state}</a><div style="clear: both"></div></div><div class="form-row">
@@ -100,11 +100,7 @@
%><div class="form-row"><label>${field_label}:</label>
- %if field_label == 'State':
- <a href="${h.url_for( controller='requests_common', action='view_request_history', cntrller=cntrller, id=trans.security.encode_id( request.id ) )}">${field_value}</a>
- %else:
- ${field_value}
- %endif
+ ${field_value}
</div><div style="clear: both"></div>
%endfor
--- a/templates/requests/common/common.mako
+++ b/templates/requests/common/common.mako
@@ -476,13 +476,7 @@
<th>Name</th>
%for index, field in fields_dict.items():
<th>
- ${field['label']}
- ## TODO: help comments in the grid header are UGLY!
- ## If they are needed display them more appropriately,
- ## if they are not, delete this commented code.
- ##<div class="toolParamHelp" style="clear: both;">
- ## <i>${field['helptext']}</i>
- ##</div>
+ <a class="display tooltip" title="${field['helptext']}" >${field['label']}</a></th>
%endfor
<th></th>
1
0
galaxy-dist commit 546dc4845175: New hyphy nj tree test output for ps2pdf version standardized across all systems, and fix for the wig_to_bigwig test.
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 1285818943 14400
# Node ID 546dc4845175c92c91e181af61b6e1d2a108230e
# Parent 940d77bec4d59a5418f9f731ca6ca114d748aa5d
New hyphy nj tree test output for ps2pdf version standardized across all systems, and fix for the wig_to_bigwig test.
--- /dev/null
+++ b/test-data/wig_to_bigwig_hg17.len
@@ -0,0 +1,46 @@
+chr10 135413628
+chr10_random 113275
+chr11 134452384
+chr12 132449811
+chr12_random 466818
+chr13 114142980
+chr13_random 186858
+chr14 106368585
+chr15 100338915
+chr15_random 784346
+chr16 88827254
+chr16_random 105485
+chr17 78774742
+chr17_random 2618010
+chr18 76117153
+chr18_random 4262
+chr19 63811651
+chr19_random 301858
+chr1 245522847
+chr1_random 3897131
+chr20 62435964
+chr21 46944323
+chr22 49554710
+chr22_random 257318
+chr2 243018229
+chr2_random 418158
+chr3 199505740
+chr3_random 970716
+chr4 191411218
+chr4_random 1030282
+chr5 180857866
+chr5_random 143687
+chr6 170975699
+chr6_random 1875562
+chr6_hla_hap1 139182
+chr6_hla_hap2 150447
+chr7 158628139
+chr7_random 778964
+chr8 146274826
+chr8_random 943810
+chr9 138429268
+chr9_random 1312665
+chrM 16571
+chrX 154824264
+chrX_random 1719168
+chrY 57701691
Binary file test-data/nj_tree_pdf_out.pdf has changed
--- a/buildbot_setup.sh
+++ b/buildbot_setup.sh
@@ -108,4 +108,10 @@ for dir in $DIRS; do
fi
done
+# for wig_to_bigWig
+if [ ! -f "tool-data/shared/ucsc/chrom/hg17.len" -a -f "test-data/wig_to_bigwig_hg17.len" ]; then
+ mkdir -p tool-data/shared/ucsc/chrom
+ cp test-data/wig_to_bigwig_hg17.len tool-data/shared/ucsc/chrom/hg17.len
+fi
+
python ./scripts/fetch_eggs.py all
1
0
galaxy-dist commit 8729d2e29b02: removed unused mako template
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 1290029052 18000
# Node ID 8729d2e29b02be031448abff34d5587b5d0d94c3
# Parent c4441790bfaae82d4e84ad11ec58cea7715ea6ef
removed unused mako template
--- a/templates/admin/requests/edit_request_type.mako
+++ /dev/null
@@ -1,79 +0,0 @@
-<%inherit file="/base.mako"/>
-<%namespace file="/message.mako" import="render_msg" />
-
-
-%if message:
- ${render_msg( message, status )}
-%endif
-
-<% num_states=len(states_list) %>
-
-<div class="toolForm">
- <div class="toolFormTitle">Edit the sequencer configuration</div>
- <div class="toolFormBody">
- <form name="library" action="${h.url_for( controller='admin', action='request_type', save_changes=True, create=False, id=request_type.id, num_states=num_states )}" method="post" >
- <div class="form-row">
- <label>Name:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="text" name="name" value="${request_type.name}" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>Description:</label>
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="text" name="description" value="${request_type.desc}" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <label>
- Sequencing request form definition:
- </label>
- <select name="form_id">
- %for form in forms:
- %if form.id == request_type.request_form_id:
- <option value="${form.id}" selected>${form.name}</option>
- %else:
- <option value="${form.id}">${form.name}</option>
- %endif
- %endfor
- </select>
- </div>
- <div class="form-row">
- <label>
- Sample form definition:
- </label>
- <select name="form_id">
- %for form in forms:
- %if form.id == request_type.sample_form_id:
- <option value="${form.id}" selected>${form.name}</option>
- %else:
- <option value="${form.id}">${form.name}</option>
- %endif
- %endfor
- </select>
- </div>
- <div class="toolFormBody">
- %for element_count, state in enumerate(states_list):
- <div class="form-row">
- <label>${1+element_count}) State name:</label>
- <input type="text" name="new_element_name_${element_count}" value="${state.name}" size="40"/>
- <label>State help text (optional):</label>
- <input type="text" name="new_element_description_${element_count}" value="${state.desc}" size="40"/>
- </div>
- <div style="clear: both"></div>
- %endfor
- </div>
- <div class="form-row">
- <div style="float: left; width: 250px; margin-right: 10px;">
- <input type="hidden" name="new" value="submitted" size="40"/>
- </div>
- <div style="clear: both"></div>
- </div>
- <div class="form-row">
- <input type="submit" name="edit_request_type_button" value="Save"/>
- </div>
- </form>
- </div>
-</div>
1
0
galaxy-dist commit f60654e287a8: Fix bug that was causing Page item selection grids to be initialized twice and hence causing grid paging to fail.
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 1285782366 14400
# Node ID f60654e287a8534bbf3aea756064ef2d15600f6d
# Parent d681ef7538ed0c2314b3ec6ed9f99050b5a2ef03
Fix bug that was causing Page item selection grids to be initialized twice and hence causing grid paging to fail.
--- a/templates/tracks/add_tracks.mako
+++ b/templates/tracks/add_tracks.mako
@@ -7,6 +7,7 @@
${render_grid_table( grid, show_item_checkboxes=True )}
## Initialize the grid.
+## TODO: This may not be necessary -- check when adding tracks is working again.
<script type="text/javascript">
init_grid_elements();
init_grid_controls();
--- a/templates/page/select_items_grid.mako
+++ b/templates/page/select_items_grid.mako
@@ -5,9 +5,3 @@
${stylesheets()}
${render_grid_header( grid, False )}
${render_grid_table( grid, show_item_checkboxes=True )}
-
-## Initialize the grid.
-<script type="text/javascript">
- init_grid_elements();
- init_grid_controls();
-</script>
1
0
galaxy-dist commit 940d77bec4d5: Remove unneeded grid initialization code.
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 1285797982 14400
# Node ID 940d77bec4d59a5418f9f731ca6ca114d748aa5d
# Parent 2aee56b5875a201b09f736764390651a177702d8
Remove unneeded grid initialization code.
--- a/templates/tracks/add_tracks.mako
+++ b/templates/tracks/add_tracks.mako
@@ -5,10 +5,3 @@
${grid_javascripts()}
${render_grid_header( grid, False )}
${render_grid_table( grid, show_item_checkboxes=True )}
-
-## Initialize the grid.
-## TODO: This may not be necessary -- check when adding tracks is working again.
-<script type="text/javascript">
- init_grid_elements();
- init_grid_controls();
-</script>
1
0
20 Nov '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1285855763 14400
# Node ID ddf70ed04c8b24f9095d4b16f6041907f7c6d428
# Parent 546dc4845175c92c91e181af61b6e1d2a108230e
sff_extractor tool
output is now explicitly set to fastqsanger when the fastq option is selected. patch by peter(a)maubp.freeserve.co.uk
--- a/tools/filters/sff_extractor.xml
+++ b/tools/filters/sff_extractor.xml
@@ -14,7 +14,7 @@
<param name="fastq_output" type="boolean" truevalue="fastq_true" falsevalue="fastq_false" checked="False" label="Do you want FASTQ file instead of FASTA + FASTA quality file?" /></inputs><outputs>
- <data format="fastq" name="out_file1" >
+ <data format="fastqsanger" name="out_file1" ><filter>fastq_output is True</filter></data><data format="xml" name="out_file2">
1
0
galaxy-dist commit 2aee56b5875a: Updated test outputs for pdf/image output tools that differ slightly on updated dependencies.
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 1285795531 14400
# Node ID 2aee56b5875a201b09f736764390651a177702d8
# Parent 516a02525898381be3a9af8f3ffec205133dbda1
Updated test outputs for pdf/image output tools that differ slightly on updated dependencies.
--- a/test-data/kpca_out2.pdf
+++ b/test-data/kpca_out2.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100310152519)
-/ModDate (D:20100310152519)
+/CreationDate (D:20100929155208)
+/ModDate (D:20100929155208)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q 47.81 276.05 240.19 228.24 re W n
Q q
0.000 0.000 0.000 RG
@@ -1115,7 +1115,7 @@ Q
endstream
endobj
7 0 obj
-22476
+22484
endobj
3 0 obj
<<
@@ -1170,15 +1170,15 @@ 0 12
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000022843 00000 n
-0000022926 00000 n
+0000022851 00000 n
+0000022934 00000 n
0000000213 00000 n
0000000293 00000 n
-0000022822 00000 n
-0000023030 00000 n
-0000023287 00000 n
-0000023370 00000 n
-0000023467 00000 n
+0000022830 00000 n
+0000023038 00000 n
+0000023295 00000 n
+0000023378 00000 n
+0000023475 00000 n
trailer
<<
/Size 12
@@ -1186,5 +1186,5 @@ trailer
/Root 2 0 R
>>
startxref
-23569
+23577
%%EOF
--- a/test-data/cca_out2.pdf
+++ b/test-data/cca_out2.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100310155029)
-/ModDate (D:20100310155029)
+/CreationDate (D:20100929152548)
+/ModDate (D:20100929152548)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
0.000 0.000 0.000 RG
0.75 w
@@ -400,7 +400,7 @@ Q
endstream
endobj
7 0 obj
-5992
+6000
endobj
8 0 obj
<<
@@ -415,7 +415,7 @@ 9 0 obj
/Length 10 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
Q q 59.04 73.44 486.72 443.52 re W n
0.000 0.000 0.000 RG
@@ -788,7 +788,7 @@ Q
endstream
endobj
10 0 obj
-6029
+6037
endobj
3 0 obj
<<
@@ -805,7 +805,7 @@ 4 0 obj
<<
/ProcSet [/PDF /Text]
/Font <</F2 12 0 R /F3 13 0 R >>
-/ExtGState << >>
+/ExtGState << /GSais 14 0 R >>
>>
endobj
11 0 obj
@@ -831,28 +831,35 @@ 13 0 obj <<
/BaseFont /Helvetica-Bold
/Encoding 11 0 R
>> endobj
+14 0 obj
+<<
+/Type /ExtGState
+/AIS false
+>>
+endobj
xref
-0 14
+0 15
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000012542 00000 n
-0000012631 00000 n
+0000012558 00000 n
+0000012647 00000 n
0000000213 00000 n
0000000293 00000 n
-0000006338 00000 n
-0000006358 00000 n
-0000006438 00000 n
-0000012521 00000 n
-0000012724 00000 n
-0000012982 00000 n
-0000013080 00000 n
+0000006346 00000 n
+0000006366 00000 n
+0000006446 00000 n
+0000012537 00000 n
+0000012754 00000 n
+0000013012 00000 n
+0000013110 00000 n
+0000013213 00000 n
trailer
<<
-/Size 14
+/Size 15
/Info 1 0 R
/Root 2 0 R
>>
startxref
-13183
+13263
%%EOF
--- a/test-data/q_values.tabular
+++ b/test-data/q_values.tabular
@@ -1,4 +1,4 @@
-pi0: 0.243863648325618
+pi0: 0.243863648325618
FDR level: 0.05
--- a/test-data/kpca_out4.pdf
+++ b/test-data/kpca_out4.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100310154313)
-/ModDate (D:20100310154313)
+/CreationDate (D:20100929160535)
+/ModDate (D:20100929160535)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
0.000 0.000 0.000 RG
0.75 w
@@ -549,7 +549,7 @@ Q
endstream
endobj
7 0 obj
-10735
+10743
endobj
3 0 obj
<<
@@ -604,15 +604,15 @@ 0 12
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000011102 00000 n
-0000011185 00000 n
+0000011110 00000 n
+0000011193 00000 n
0000000213 00000 n
0000000293 00000 n
-0000011081 00000 n
-0000011289 00000 n
-0000011546 00000 n
-0000011629 00000 n
-0000011726 00000 n
+0000011089 00000 n
+0000011297 00000 n
+0000011554 00000 n
+0000011637 00000 n
+0000011734 00000 n
trailer
<<
/Size 12
@@ -620,5 +620,5 @@ trailer
/Root 2 0 R
>>
startxref
-11828
+11836
%%EOF
--- a/test-data/histogram_out1.pdf
+++ b/test-data/histogram_out1.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20091214150037)
-/ModDate (D:20091214150037)
+/CreationDate (D:20100929153637)
+/ModDate (D:20100929153637)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q
BT
0.000 0.000 0.000 rg
@@ -479,7 +479,7 @@ Q
endstream
endobj
7 0 obj
-7417
+7425
endobj
3 0 obj
<<
@@ -495,7 +495,7 @@ 4 0 obj
<<
/ProcSet [/PDF /Text]
/Font <</F2 9 0 R /F3 10 0 R >>
-/ExtGState << >>
+/ExtGState << /GSais 11 0 R >>
>>
endobj
8 0 obj
@@ -521,25 +521,32 @@ 10 0 obj <<
/BaseFont /Helvetica-Bold
/Encoding 8 0 R
>> endobj
+11 0 obj
+<<
+/Type /ExtGState
+/AIS false
+>>
+endobj
xref
-0 11
+0 12
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000007783 00000 n
-0000007866 00000 n
+0000007791 00000 n
+0000007874 00000 n
0000000213 00000 n
0000000293 00000 n
-0000007763 00000 n
-0000007958 00000 n
-0000008215 00000 n
-0000008311 00000 n
+0000007771 00000 n
+0000007980 00000 n
+0000008237 00000 n
+0000008333 00000 n
+0000008435 00000 n
trailer
<<
-/Size 11
+/Size 12
/Info 1 0 R
/Root 2 0 R
>>
startxref
-8413
+8485
%%EOF
--- a/test-data/pca_out4.pdf
+++ b/test-data/pca_out4.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100310155851)
-/ModDate (D:20100310155851)
+/CreationDate (D:20100929163248)
+/ModDate (D:20100929163248)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q
0.000 0.000 0.000 RG
0.75 w
@@ -647,7 +647,7 @@ Q
endstream
endobj
7 0 obj
-12853
+12861
endobj
3 0 obj
<<
@@ -663,7 +663,7 @@ 4 0 obj
<<
/ProcSet [/PDF /Text]
/Font <</F2 9 0 R >>
-/ExtGState << >>
+/ExtGState << /GSais 10 0 R >>
>>
endobj
8 0 obj
@@ -682,24 +682,31 @@ 9 0 obj <<
/BaseFont /Helvetica
/Encoding 8 0 R
>> endobj
+10 0 obj
+<<
+/Type /ExtGState
+/AIS false
+>>
+endobj
xref
-0 10
+0 11
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000013220 00000 n
-0000013303 00000 n
+0000013228 00000 n
+0000013311 00000 n
0000000213 00000 n
0000000293 00000 n
-0000013199 00000 n
-0000013384 00000 n
-0000013641 00000 n
+0000013207 00000 n
+0000013406 00000 n
+0000013663 00000 n
+0000013759 00000 n
trailer
<<
-/Size 10
+/Size 11
/Info 1 0 R
/Root 2 0 R
>>
startxref
-13737
+13809
%%EOF
--- a/test-data/pca_out6.pdf
+++ b/test-data/pca_out6.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100914141739)
-/ModDate (D:20100914141739)
+/CreationDate (D:20100929164125)
+/ModDate (D:20100929164125)
/Title (R Graphics Output)
-/Producer (R 2.11.1)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
Binary file test-data/454Score.png has changed
--- a/test-data/regr_out.pdf
+++ b/test-data/regr_out.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100603105440)
-/ModDate (D:20100603105440)
+/CreationDate (D:20100929153009)
+/ModDate (D:20100929153009)
/Title (R Graphics Output)
-/Producer (R 2.9.2)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q 38.02 358.66 166.66 160.32 re W n
Q q
0.000 0.000 0.000 RG
@@ -524,7 +524,7 @@ Q
endstream
endobj
7 0 obj
-9361
+9369
endobj
8 0 obj
<<
@@ -539,7 +539,7 @@ 9 0 obj
/Length 10 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
Q q
0.000 0.000 0.000 RG
@@ -695,7 +695,7 @@ Q
endstream
endobj
10 0 obj
-3090
+3098
endobj
11 0 obj
<<
@@ -710,7 +710,7 @@ 12 0 obj
/Length 13 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
Q q 59.04 73.44 486.72 443.52 re W n
0.000 0.000 0.000 RG
@@ -850,7 +850,7 @@ Q
endstream
endobj
13 0 obj
-2841
+2849
endobj
14 0 obj
<<
@@ -865,7 +865,7 @@ 15 0 obj
/Length 16 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
Q q
0.000 0.000 0.000 RG
@@ -1090,7 +1090,7 @@ Q
endstream
endobj
16 0 obj
-4322
+4330
endobj
17 0 obj
<<
@@ -1105,7 +1105,7 @@ 18 0 obj
/Length 19 0 R
>>
stream
-q
+1 J 1 j q
Q q 59.04 73.44 486.72 443.52 re W n
Q q
0.000 0.000 0.000 RG
@@ -1499,7 +1499,7 @@ Q
endstream
endobj
19 0 obj
-6882
+6890
endobj
3 0 obj
<<
@@ -1519,7 +1519,7 @@ 4 0 obj
<<
/ProcSet [/PDF /Text]
/Font << /F1 21 0 R /F2 22 0 R /F3 23 0 R >>
-/ExtGState << >>
+/ExtGState << /GSais 24 0 R >>
>>
endobj
20 0 obj
@@ -1553,38 +1553,45 @@ 23 0 obj <<
/BaseFont /Helvetica-Bold
/Encoding 20 0 R
>> endobj
+24 0 obj
+<<
+/Type /ExtGState
+/AIS false
+>>
+endobj
xref
-0 24
+0 25
0000000000 65535 f
0000000021 00000 n
-0000000163 00000 n
-0000027490 00000 n
-0000027600 00000 n
-0000000212 00000 n
-0000000292 00000 n
-0000009706 00000 n
-0000009726 00000 n
-0000009806 00000 n
-0000012950 00000 n
-0000012971 00000 n
-0000013053 00000 n
-0000015949 00000 n
-0000015970 00000 n
-0000016052 00000 n
-0000020429 00000 n
-0000020450 00000 n
-0000020532 00000 n
-0000027469 00000 n
-0000027705 00000 n
-0000027963 00000 n
-0000028047 00000 n
-0000028145 00000 n
+0000000164 00000 n
+0000027531 00000 n
+0000027641 00000 n
+0000000213 00000 n
+0000000293 00000 n
+0000009715 00000 n
+0000009735 00000 n
+0000009815 00000 n
+0000012967 00000 n
+0000012988 00000 n
+0000013070 00000 n
+0000015974 00000 n
+0000015995 00000 n
+0000016077 00000 n
+0000020462 00000 n
+0000020483 00000 n
+0000020565 00000 n
+0000027510 00000 n
+0000027760 00000 n
+0000028018 00000 n
+0000028102 00000 n
+0000028200 00000 n
+0000028303 00000 n
trailer
<<
-/Size 24
+/Size 25
/Info 1 0 R
/Root 2 0 R
>>
startxref
-28248
+28353
%%EOF
--- a/test-data/pca_out2.pdf
+++ b/test-data/pca_out2.pdf
@@ -2,10 +2,10 @@
%���ρ�\r
1 0 obj
<<
-/CreationDate (D:20100310155829)
-/ModDate (D:20100310155829)
+/CreationDate (D:20100929163120)
+/ModDate (D:20100929163120)
/Title (R Graphics Output)
-/Producer (R 2.10.0)
+/Producer (R 2.11.0)
/Creator (R)
>>
endobj
@@ -28,7 +28,7 @@ 6 0 obj
/Length 7 0 R
>>
stream
-q
+1 J 1 j q
Q q
0.000 0.000 0.000 RG
0.75 w
@@ -647,7 +647,7 @@ Q
endstream
endobj
7 0 obj
-12848
+12856
endobj
3 0 obj
<<
@@ -663,7 +663,7 @@ 4 0 obj
<<
/ProcSet [/PDF /Text]
/Font <</F2 9 0 R >>
-/ExtGState << >>
+/ExtGState << /GSais 10 0 R >>
>>
endobj
8 0 obj
@@ -682,24 +682,31 @@ 9 0 obj <<
/BaseFont /Helvetica
/Encoding 8 0 R
>> endobj
+10 0 obj
+<<
+/Type /ExtGState
+/AIS false
+>>
+endobj
xref
-0 10
+0 11
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000013215 00000 n
-0000013298 00000 n
+0000013223 00000 n
+0000013306 00000 n
0000000213 00000 n
0000000293 00000 n
-0000013194 00000 n
-0000013379 00000 n
-0000013636 00000 n
+0000013202 00000 n
+0000013401 00000 n
+0000013658 00000 n
+0000013754 00000 n
trailer
<<
-/Size 10
+/Size 11
/Info 1 0 R
/Root 2 0 R
>>
startxref
-13732
+13804
%%EOF
Binary file test-data/boxplot_summary_statistics_out.png has changed
Binary file test-data/solexaScore.png has changed
1
0
galaxy-dist commit 264c608b48d9: Fixed inconsistency in PerM loc.sample 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 Kelly Vincent <kpvincent(a)bx.psu.edu>
# Date 1290012220 18000
# Node ID 264c608b48d9b0db2a142d820e32ec1d1fa550dd
# Parent 5ec30f459e8e4a1186f666f4879e14f082f17352
Fixed inconsistency in PerM loc.sample files
--- a/tool-data/perm_color_index.loc.sample
+++ b/tool-data/perm_color_index.loc.sample
@@ -13,7 +13,7 @@
#50, and stored in /depot/data/galaxy/phiX/perm_index/,
#then the perm_color_index.loc entry would look something like this:
#
-#phiX_F3_50 phiX: seed=F3, read length=50 /depot/data/galaxy/phiX/perm_index/phiX_color_F3_50.index
+#phiX_F3_50 phiX: seed=F3, read length=50 /data/galaxy/phiX/perm_index/phiX_color_F3_50.index
#
#and your /depot/data/galaxy/phiX/perm_index/ directory
#would contain the file phiX_color_F3_50.index:
@@ -21,8 +21,8 @@
#Your perm_color_index.loc file should include an entry per line for each
#index set you have stored. For example:
#
-#phiX_F3_50 /depot/data/galaxy/phiX/perm_index/phiX_color_F3_50.index
-#phiX_F4_50 /depot/data/galaxy/phiX/perm_index/phiX_color_F3_50.index
-#hg19_F3_50 /depot/data/galaxy/hg19/perm_index/hg19_color_F3_50.index
-#hg19_F4_50 /depot/data/galaxy/hg19/perm_index/hg19_color_F3_50.index
+#phiX_F3_50 phiX: seed=F3, read length=50 /data/galaxy/phiX/perm_index/phiX_color_F3_50.index
+#phiX_F4_50 phiX: seed=F4, read length=50 /data/galaxy/phiX/perm_index/phiX_color_F3_50.index
+#hg19_F3_50 hg19: seed=F3, read length=50 /data/galaxy/hg19/perm_index/hg19_color_F3_50.index
+#hg19_F4_50 hg19: seed=F4, read length=50 /data/galaxy/hg19/perm_index/hg19_color_F3_50.index
#
--- a/tool-data/perm_base_index.loc.sample
+++ b/tool-data/perm_base_index.loc.sample
@@ -21,8 +21,7 @@
#Your perm_base_index.loc file should include an entry per line for each
#index set you have stored. For example:
#
-#phiX_F3_50 /depot/data/galaxy/phiX/perm_index/phiX_base_F3_50.index
-#phiX_F4_50 /depot/data/galaxy/phiX/perm_index/phiX_base_F3_50.index
-#hg19_F3_50 /depot/data/galaxy/hg19/perm_index/hg19_base_F3_50.index
-#hg19_F4_50 /depot/data/galaxy/hg19/perm_index/hg19_base_F3_50.index
-#
+#phiX_F3_50 phiX: seed=F3, read length=50 /data/galaxy/phiX/perm_index/phiX_base_F3_50.index
+#phiX_F4_50 phiX: seed=F4, read length=50 /data/galaxy/phiX/perm_index/phiX_base_F3_50.index
+#hg19_F3_50 hg19: seed=F3, read length=50 /data/galaxy/hg19/perm_index/hg19_base_F3_50.index
+#hg19_F4_50 hg19: seed=F4, read length=50 /data/galaxy/hg19/perm_index/hg19_base_F3_50.index
1
0