diff --git a/client/galaxy/scripts/viz/trackster.js b/client/galaxy/scripts/viz/trackster.js
index 67d8dd07c35..6da2b057a0b 100644
--- a/client/galaxy/scripts/viz/trackster.js
+++ b/client/galaxy/scripts/viz/trackster.js
@@ -12,7 +12,6 @@ require(
[
// load js libraries
'utils/utils',
- 'mvc/ui/icon-button',
'libs/jquery/jquery.event.drag',
'libs/jquery/jquery.event.hover',
'libs/jquery/jquery.mousewheel',
@@ -32,9 +31,8 @@ require(
});
// trackster viewer
-define( ["libs/underscore", "base", "viz/trackster/tracks", "viz/visualization"],
- function(_, base, tracks, visualization) {
-
+define( ["libs/underscore", "base", "viz/trackster/tracks", "viz/visualization", "mvc/ui/icon-button" ],
+ function(_, base, tracks, visualization, mod_icon_btn) {
/**
* User interface controls for trackster
*/
diff --git a/config/datatypes_conf.xml.sample b/config/datatypes_conf.xml.sample
index 50b55b28cca..6d3f80a57c2 100644
--- a/config/datatypes_conf.xml.sample
+++ b/config/datatypes_conf.xml.sample
@@ -140,6 +140,7 @@
+
@@ -304,6 +305,7 @@
+
diff --git a/eggs.ini b/eggs.ini
index 409cf5a4951..9cea83e2a5b 100644
--- a/eggs.ini
+++ b/eggs.ini
@@ -15,7 +15,7 @@ no_auto = pbs_python
bx_python = 0.7.2
Cheetah = 2.2.2
MarkupSafe = 0.12
-mercurial = 2.2.3
+mercurial = 3.2.4
MySQL_python = 1.2.3c1
PyRods = 3.2.4
numpy = 1.6.0
diff --git a/lib/galaxy/datatypes/sequence.py b/lib/galaxy/datatypes/sequence.py
index 58bb9a7bee5..98530928512 100644
--- a/lib/galaxy/datatypes/sequence.py
+++ b/lib/galaxy/datatypes/sequence.py
@@ -17,7 +17,7 @@ from galaxy.datatypes import metadata
from galaxy.datatypes.checkers import is_gzip
from galaxy.datatypes.sniff import get_test_fname, get_headers
from galaxy.datatypes.metadata import MetadataElement
-
+from galaxy.datatypes.util.image_util import check_image_type
try:
eggs.require( "bx-python" )
@@ -814,3 +814,34 @@ class Lav( data.Text ):
except:
return False
+
+class RNADotPlotMatrix( data.Data ):
+ file_ext = "rna_eps"
+
+ def set_peek( self, dataset, is_multi_byte=False ):
+ if not dataset.dataset.purged:
+ dataset.peek = 'RNA Dot Plot format (Postscript derivative)'
+ dataset.blurb = data.nice_size( dataset.get_size() )
+ else:
+ dataset.peek = 'file does not exist'
+ dataset.blurb = 'file purged from disk'
+
+ def sniff(self, filename):
+ """Determine if the file is in RNA dot plot format."""
+ if check_image_type( filename, ['EPS'] ):
+ seq = False
+ coor = False
+ pairs = False
+ with open( filename ) as handle:
+ for line in handle:
+ line = line.strip()
+ if line:
+ if line.startswith('/sequence'):
+ seq = True
+ elif line.startswith('/coor'):
+ coor = True
+ elif line.startswith('/pairs'):
+ pairs = True
+ if seq and coor and pairs:
+ return True
+ return False
\ No newline at end of file
diff --git a/lib/galaxy/datatypes/util/image_util.py b/lib/galaxy/datatypes/util/image_util.py
index 81855f02b65..01a0b66ef1e 100644
--- a/lib/galaxy/datatypes/util/image_util.py
+++ b/lib/galaxy/datatypes/util/image_util.py
@@ -71,6 +71,4 @@ def get_image_ext ( file_path, image ):
return 'pbm'
if format == 'PGM':
return 'pgm'
- if format == 'EPS':
- return 'eps'
return None
diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py
index 06f89c2baff..1b20c02b1af 100644
--- a/lib/galaxy/tools/toolbox/base.py
+++ b/lib/galaxy/tools/toolbox/base.py
@@ -394,7 +394,7 @@ class AbstractToolBox( object, Dictifiable ):
section.elems.stub_label( section_id )
self._integrated_tool_panel.append_section( key, section )
elif elem.tag == 'label':
- section.stub_label( key )
+ self._integrated_tool_panel.stub_label( key )
def _write_integrated_tool_panel_config_file( self ):
"""
diff --git a/lib/tool_shed/util/hg_util.py b/lib/tool_shed/util/hg_util.py
index 66dfab9071c..1f46ab953d1 100644
--- a/lib/tool_shed/util/hg_util.py
+++ b/lib/tool_shed/util/hg_util.py
@@ -16,7 +16,7 @@ from mercurial import cmdutil
from mercurial import commands
from mercurial import hg
from mercurial import ui
-from mercurial.changegroup import readbundle
+from mercurial.exchange import readbundle
from mercurial.changegroup import readexactly
from tool_shed.util import basic_util
@@ -26,7 +26,7 @@ log = logging.getLogger( __name__ )
INITIAL_CHANGELOG_HASH = '000000000000'
def add_changeset( repo_ui, repo, path_to_filename_in_archive ):
- commands.add( repo_ui, repo, path_to_filename_in_archive )
+ commands.add( repo_ui, repo, str( path_to_filename_in_archive ) )
def archive_repository_revision( app, repository, archive_dir, changeset_revision ):
'''Create an un-versioned archive of a repository.'''
@@ -49,7 +49,7 @@ def bundle_to_json( fh ):
command line) to a json object.
"""
# See http://www.wstein.org/home/wstein/www/home/was/patches/hg_json
- hg_unbundle10_obj = readbundle( fh, None )
+ hg_unbundle10_obj = readbundle( None, fh, None )
groups = [ group for group in unpack_groups( hg_unbundle10_obj ) ]
return json.dumps( groups, indent=4 )
diff --git a/static/scripts/packed/viz/trackster.js b/static/scripts/packed/viz/trackster.js
index e55bdf6a94c..b7051135501 100644
--- a/static/scripts/packed/viz/trackster.js
+++ b/static/scripts/packed/viz/trackster.js
@@ -1 +1 @@
-var ui=null;var view=null;var browser_router=null;require(["utils/utils","mvc/ui/icon-button","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/select2","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating"],function(b,a){b.cssLoadFile("static/style/jquery.rating.css");b.cssLoadFile("static/style/autocomplete_tagging.css");b.cssLoadFile("static/style/jquery-ui/smoothness/jquery-ui.css");b.cssLoadFile("static/style/library.css");b.cssLoadFile("static/style/trackster.css")});define(["libs/underscore","base","viz/trackster/tracks","viz/visualization"],function(b,e,a,c){var d=e.Base.extend({initialize:function(g){this.baseURL=g},save_viz:function(){Galaxy.modal.show({title:"Saving...",body:"progress"});var g=[];$(".bookmark").each(function(){g.push({position:$(this).children(".position").text(),annotation:$(this).children(".annotation").text()})});var h=(view.overview_drawable?view.overview_drawable.config.get_value("name"):null),j={view:view.to_dict(),viewport:{chrom:view.chrom,start:view.low,end:view.high,overview:h},bookmarks:g};return $.ajax({url:galaxy_config.root+"visualization/save",type:"POST",dataType:"json",data:{id:view.vis_id,title:view.config.get_value("name"),dbkey:view.dbkey,type:"trackster",vis_json:JSON.stringify(j)}}).success(function(k){Galaxy.modal.hide();view.vis_id=k.vis_id;view.has_changes=false;window.history.pushState({},"",k.url+window.location.hash)}).error(function(){Galaxy.modal.show({title:"Could Not Save",body:"Could not save visualization. Please try again later.",buttons:{Cancel:function(){Galaxy.modal.hide()}}})})},createButtonMenu:function(){var g=this,h=mod_icon_btn.create_icon_buttons_menu([{icon_class:"plus-button",title:"Add tracks",on_click:function(){c.select_datasets(galaxy_config.root+"visualization/list_current_history_datasets",galaxy_config.root+"api/datasets",{"f-dbkey":view.dbkey},function(j){b.each(j,function(k){view.add_drawable(a.object_from_template(k,view,view))})})}},{icon_class:"block--plus",title:"Add group",on_click:function(){view.add_drawable(new a.DrawableGroup(view,view,{name:"New Group"}))}},{icon_class:"bookmarks",title:"Bookmarks",on_click:function(){force_right_panel(($("div#right").css("right")=="0px"?"hide":"show"))}},{icon_class:"globe",title:"Circster",on_click:function(){window.location=g.baseURL+"visualization/circster?id="+view.vis_id}},{icon_class:"disk--arrow",title:"Save",on_click:function(){g.save_viz()}},{icon_class:"cross-circle",title:"Close",on_click:function(){g.handle_unsaved_changes(view)}}],{tooltip_config:{placement:"bottom"}});this.buttonMenu=h;return h},add_bookmarks:function(){var g=this,h=this.baseURL;Galaxy.modal.show({title:"Select dataset for new bookmarks",body:"progress"});$.ajax({url:this.baseURL+"/visualization/list_histories",data:{"f-dbkey":view.dbkey},error:function(){alert("Grid failed")},success:function(j){Galaxy.modal.show({title:"Select dataset for new bookmarks",body:j,buttons:{Cancel:function(){Galaxy.modal.hide()},Insert:function(){$("input[name=id]:checked,input[name=ldda_ids]:checked").first().each(function(){var k,l=$(this).val();if($(this).attr("name")==="id"){k={hda_id:l}}else{k={ldda_id:l}}$.ajax({url:this.baseURL+"/visualization/bookmarks_from_dataset",data:k,dataType:"json"}).then(function(m){for(i=0;i").addClass("bookmark").appendTo(n);var q=$("
").addClass("position").appendTo(p),m=$("").text(l).appendTo(q).click(function(){view.go_to(l);return false}),k=$("").text(j).appendTo(p);if(g){var o=$("").addClass("delete-icon-container").prependTo(p).click(function(){p.slideUp("fast");p.remove();view.has_changes=true;return false}),h=$("").addClass("icon-button delete").appendTo(o);k.make_text_editable({num_rows:3,use_textarea:true,help_text:"Edit bookmark note"}).addClass("annotation")}view.has_changes=true;return p},create_visualization:function(m,g,l,n,k){var j=this,h=new a.TracksterView(b.extend(m,{header:false}));h.editor=true;$.when(h.load_chroms_deferred).then(function(y){if(g){var w=g.chrom,o=g.start,t=g.end,q=g.overview;if(w&&(o!==undefined)&&t){h.change_chrom(w,o,t)}else{h.change_chrom(y[0].chrom)}}else{h.change_chrom(y[0].chrom)}if(l){var r,p,s;for(var u=0;u