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
August 2013
- 1 participants
- 149 discussions
commit/galaxy-central: jgoecks: UI and Trackster: (a) restore trackster tool save functionality; (b) add toggle functionality to visibility mixin; (c) extend tool class to create trackster tool rather than create new class.
by commits-noreply@bitbucket.org 28 Aug '13
by commits-noreply@bitbucket.org 28 Aug '13
28 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/533fb8fcc330/
Changeset: 533fb8fcc330
User: jgoecks
Date: 2013-08-28 23:46:03
Summary: UI and Trackster: (a) restore trackster tool save functionality; (b) add toggle functionality to visibility mixin; (c) extend tool class to create trackster tool rather than create new class.
Affected #: 2 files
diff -r fc4e1a162195e45f69573724adec564ffe1ea9ee -r 533fb8fcc330c52646529659a246e1c50dc18e6a static/scripts/mvc/tools.js
--- a/static/scripts/mvc/tools.js
+++ b/static/scripts/mvc/tools.js
@@ -18,6 +18,10 @@
hide: function() {
this.set("hidden", true);
},
+
+ toggle: function() {
+ this.set("hidden", !this.get("hidden"));
+ },
is_visible: function() {
return !this.attributes.hidden;
@@ -600,8 +604,8 @@
query_changed: function( evData ) {
// check for the 'clear key' (ESC) first
- if( ( this.model.attributes.clear_key )
- && ( this.model.attributes.clear_key === evData.which ) ){
+ if( ( this.model.attributes.clear_key ) &&
+ ( this.model.attributes.clear_key === evData.which ) ){
this.clear();
return false;
}
diff -r fc4e1a162195e45f69573724adec564ffe1ea9ee -r 533fb8fcc330c52646529659a246e1c50dc18e6a static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -1622,25 +1622,25 @@
/**
* Encapsulation of a tool that users can apply to tracks/datasets.
*/
-var TracksterTool = Backbone.RelationalModel.extend({
+var TracksterTool = tools_mod.Tool.extend({
defaults: {
- track: null,
- tool: null,
+ track: null
},
- relations: [
- {
- type: Backbone.HasOne,
- key: 'tool',
- relatedModel: tools_mod.Tool
+ initialize: function(options) {
+ // Restore tool visibility from state.
+ if (options.tool_state !== undefined) {
+ this.set('hidden', options.tool_state.hidden)
}
- ],
-
- initialize: function(options) {
+
+ // FIXME: need to restore tool values from options.tool_state
+
// HACK: remove some inputs because Trackster does yet not work with them.
- this.get('tool').remove_inputs( [ 'data', 'hidden_data', 'conditional' ] );
-
- // FIXME: need to restore tool values/visibility.
+ this.remove_inputs( [ 'data', 'hidden_data', 'conditional' ] );
+ },
+
+ state_dict: function(options) {
+ return _.extend( this.get_inputs_dict(), { hidden: !this.is_visible() } );
}
});
@@ -1678,12 +1678,16 @@
*/
var TracksterToolView = Backbone.View.extend({
+ initialize: function(options) {
+ this.model.on('change:hidden', this.set_visible, this);
+ },
+
/**
* Render tool UI.
*/
render: function() {
var self = this;
- tool = this.model.get('tool'),
+ tool = this.model,
parent_div = this.$el.addClass("dynamic-tool").hide();
// Prevent div events from propogating to other elements.
@@ -1719,11 +1723,21 @@
self.run_on_dataset();
});
- /*
- if ('visible' in tool_state_dict && tool_state_dict.visible) {
- this.parent_div.show();
+ if (tool.is_visible()) {
+ this.$el.show();
}
- */
+ },
+
+ /**
+ * Show or hide tool depending on tool visibility state.
+ */
+ set_visible: function() {
+ if (this.model.is_visible()) {
+ this.$el.show();
+ }
+ else {
+ this.$el.hide();
+ }
},
/**
@@ -1736,23 +1750,10 @@
},
/**
- * Returns a dict with tool state information.
- */
- state_dict: function() {
- // Save parameter values.
- var tool_state = this.model.get('tool').get_param_values_dict();
-
- // Save visibility.
- tool_state.visible = this.parent_div.is(":visible");
-
- return tool_state;
- },
-
- /**
* Run tool on dataset. Output is placed in dataset's history and no changes to viz are made.
*/
run_on_dataset: function() {
- var tool = this.model.get('tool');
+ var tool = this.model;
this.run(
// URL params.
{
@@ -1779,7 +1780,7 @@
// Create track for tool's output immediately to provide user feedback.
//
var track = this.model.get('track'),
- tool = this.model.get('tool'),
+ tool = this.model,
region = new visualization.GenomeRegion({
chrom: track.view.chrom,
start: track.view.low,
@@ -1850,7 +1851,7 @@
*/
run: function(url_params, new_track, success_callback) {
// Run tool.
- url_params.inputs = this.model.get('tool').get_inputs_dict();
+ url_params.inputs = this.model.get_inputs_dict();
var ss_deferred = new util.ServerStateDeferred({
ajax_settings: {
url: galaxy_config.root + "api/tools",
@@ -2405,10 +2406,10 @@
on_click_fn: function(track) {
// TODO: update tipsy text.
- track.dynamic_tool_div.toggle();
+ track.tool.toggle();
// Update track name.
- if (track.dynamic_tool_div.is(":visible")) {
+ if (track.tool.is_visible()) {
track.set_name(track.name + track.tool_region_and_parameters_str());
}
else {
@@ -2790,11 +2791,10 @@
// FIXME: prolly need function to set filters and update data_manager reference.
this.data_manager.set('filters_manager', this.filters_manager);
this.filters_available = false;
- this.tool = (obj_dict.tool ? new TracksterTool({
- 'track': this,
- 'tool': obj_dict.tool,
+ this.tool = (obj_dict.tool ? new TracksterTool( _.extend( obj_dict.tool, {
+ 'track': this,
'tool_state': obj_dict.tool_state
- })
+ } ) )
: null);
this.tile_cache = new visualization.Cache(TILE_CACHE_SIZE);
this.left_offset = 0;
@@ -3333,9 +3333,7 @@
* @param w_scale pixels per base
* @param ref_seq reference sequence data
*/
- draw_tile: function(result, ctx, mode, resolution, region, w_scale, ref_seq) {
- console.log("Warning: TiledTrack.draw_tile() not implemented.");
- },
+ draw_tile: function(result, ctx, mode, resolution, region, w_scale, ref_seq) {},
/**
* Show track tile and perform associated actions. Showing tile may actually move
@@ -3406,7 +3404,7 @@
tool_region_and_parameters_str: function(region) {
var track = this,
region_str = (region !== undefined ? region.toString() : "all"),
- param_str = _.values( track.tool.get('tool').get_inputs_dict()).join(', ');
+ param_str = _.values( track.tool.get_inputs_dict()).join(', ');
return " - region=[" + region_str + "], parameters=[" + param_str + "]";
},
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/d1593c067833/
Changeset: d1593c067833
User: natefoo
Date: 2013-08-28 22:08:21
Summary: Reorganize object store options in sample config file.
Affected #: 1 file
diff -r 4fea98291cbce9a0e8d580bfd9c4ef4a5184c680 -r d1593c067833c8dc4c85bdcc7b4d90b79d8ab01c universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -203,6 +203,41 @@
# breaking existing tools.
#collect_outputs_from = new_file_path,job_working_directory
+# -- Data Storage (Object Store)
+
+# Object store backend module (valid options are: disk, s3, swift, irods,
+# distributed, hierarchical)
+#object_store = disk
+
+# Credentials used by certain (s3, swift) object store backends
+#os_access_key = <your cloud object store access key>
+#os_secret_key = <your cloud object store secret key>
+#os_bucket_name = <name of an existing object store bucket or container>
+
+# If using 'swift' object store, you must specify the following connection
+# properties
+#os_host = swift.rc.nectar.org.au
+#os_port = 8888
+#os_is_secure = False
+#os_conn_path = /
+
+# Reduced redundancy can be used only with the 's3' object store
+#os_use_reduced_redundancy = False
+
+# Path to cache directory for object store backends that utilize a cache (s3,
+# swift, irods)
+#object_store_cache_path = database/files/
+
+# Size (in GB) that the cache used by object store should be limited to.
+# If the value is not specified, the cache size will be limited only by the
+# file system size.
+#object_store_cache_size = 100
+
+# Configuration file for the distributed object store, if object_store =
+# distributed. See the sample at distributed_object_store_conf.xml.sample
+#distributed_object_store_config_file = None
+
+
# -- Mail and notification
# Galaxy sends mail for various things: Subscribing users to the mailing list
@@ -524,28 +559,6 @@
# -- Beta features
-# Object store mode (valid options are: disk, s3, swift, distributed, hierarchical)
-#object_store = disk
-#os_access_key = <your cloud object store access key>
-#os_secret_key = <your cloud object store secret key>
-#os_bucket_name = <name of an existing object store bucket or container>
-# If using 'swift' object store, you must specify the following connection properties
-#os_host = swift.rc.nectar.org.au
-#os_port = 8888
-#os_is_secure = False
-#os_conn_path = /
-# Reduced redundancy can be used only with the 's3' object store
-#os_use_reduced_redundancy = False
-# Size (in GB) that the cache used by object store should be limited to.
-# If the value is not specified, the cache size will be limited only by the
-# file system size. The file system location of the cache is considered the
-# configuration of the ``file_path`` directive defined above.
-#object_store_cache_size = 100
-
-# Configuration file for the distributed object store, if object_store =
-# distributed. See the sample at distributed_object_store_conf.xml.sample
-#distributed_object_store_config_file = None
-
# Enable Galaxy to communicate directly with a sequencer
#enable_sequencer_communication = False
https://bitbucket.org/galaxy/galaxy-central/commits/75bcfb029e8c/
Changeset: 75bcfb029e8c
User: natefoo
Date: 2013-08-28 22:11:29
Summary: Implement a local_extra_dirs decorator in the object store that object store plugins (e.g. cloud object stores) can use to cause things like the job_working_directory to be stored on local disk.
Affected #: 1 file
diff -r d1593c067833c8dc4c85bdcc7b4d90b79d8ab01c -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -25,7 +25,7 @@
"""
ObjectStore abstract interface
"""
- def __init__(self):
+ def __init__(self, config, **kwargs):
self.running = True
self.extra_dirs = {}
@@ -195,7 +195,7 @@
>>> assert s.get_filename(obj) == file_path + '/000/dataset_1.dat'
"""
def __init__(self, config, file_path=None, extra_dirs=None):
- super(DiskObjectStore, self).__init__()
+ super(DiskObjectStore, self).__init__(config, file_path=file_path, extra_dirs=extra_dirs)
self.file_path = file_path or config.file_path
self.config = config
self.extra_dirs['job_work'] = config.job_working_directory
@@ -213,6 +213,7 @@
if not os.path.exists(path):
return self._construct_path(obj, base_dir=base_dir, dir_only=dir_only, extra_dir=extra_dir, extra_dir_at_root=extra_dir_at_root, alt_name=alt_name)
+ # TODO: rename to _disk_path or something like that to avoid conflicts with children that'll use the local_extra_dirs decorator, e.g. S3
def _construct_path(self, obj, old_style=False, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None, **kwargs):
""" Construct the expected absolute path for accessing the object
identified by `obj`.id.
@@ -544,6 +545,19 @@
else:
log.error("Unrecognized object store definition: {0}".format(store))
+def local_extra_dirs( func ):
+ """ A decorator for non-local plugins to utilize local directories for their extra_dirs (job_working_directory and temp).
+ """
+ def wraps( self, *args, **kwargs ):
+ if kwargs.get( 'base_dir', None ) is None:
+ return func( self, *args, **kwargs )
+ else:
+ for c in self.__class__.__mro__:
+ if c.__name__ == 'DiskObjectStore':
+ return getattr( c, func.__name__ )( self, *args, **kwargs )
+ raise Exception( "Could not call DiskObjectStore's %s method, does your Object Store plugin inherit from DiskObjectStore?" % func.__name__ )
+ return wraps
+
def convert_bytes(bytes):
""" A helper function used for pretty printing disk usage """
if bytes is None:
https://bitbucket.org/galaxy/galaxy-central/commits/fc4e1a162195/
Changeset: fc4e1a162195
User: natefoo
Date: 2013-08-28 22:20:19
Summary: Experimental/alpha/in-development/incomplete object store plugin for iRODS. This plugin will probably set your iRODS instance on fire: do not use except in development/testing.
Affected #: 6 files
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -18,6 +18,7 @@
MarkupSafe = 0.12
mercurial = 2.2.3
MySQL_python = 1.2.3c1
+PyRods = 3.2.4
numpy = 1.6.0
pbs_python = 4.3.5
psycopg2 = 2.0.13
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -209,6 +209,7 @@
if self.nginx_upload_store:
self.nginx_upload_store = os.path.abspath( self.nginx_upload_store )
self.object_store = kwargs.get( 'object_store', 'disk' )
+ self.object_store_cache_path = resolve_path( kwargs.get( "object_store_cache_path", "database/object_store_cache" ), self.root )
# Handle AWS-specific config options for backward compatibility
if kwargs.get( 'aws_access_key', None) is not None:
self.os_access_key= kwargs.get( 'aws_access_key', None )
@@ -228,6 +229,8 @@
self.distributed_object_store_config_file = kwargs.get( 'distributed_object_store_config_file', None )
if self.distributed_object_store_config_file is not None:
self.distributed_object_store_config_file = resolve_path( self.distributed_object_store_config_file, self.root )
+ self.irods_root_collection_path = kwargs.get( 'irods_root_collection_path', None )
+ self.irods_default_resource = kwargs.get( 'irods_default_resource', None )
# Parse global_conf and save the parser
global_conf = kwargs.get( 'global_conf', None )
global_conf_parser = ConfigParser.ConfigParser()
@@ -369,6 +372,7 @@
self.nginx_upload_store, \
'./static/genetrack/plots', \
self.whoosh_index_dir, \
+ self.object_store_cache_path, \
os.path.join( self.tool_data_path, 'shared', 'jars' ):
if path not in [ None, False ] and not os.path.isdir( path ):
try:
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee lib/galaxy/eggs/__init__.py
--- a/lib/galaxy/eggs/__init__.py
+++ b/lib/galaxy/eggs/__init__.py
@@ -387,7 +387,8 @@
"guppy": lambda: self.config.get( "app:main", "use_memdump" ),
"python_openid": lambda: self.config.get( "app:main", "enable_openid" ),
"python_daemon": lambda: sys.version_info[:2] >= ( 2, 5 ),
- "pysam": lambda: check_pysam()
+ "pysam": lambda: check_pysam(),
+ "PyRods": lambda: self.config.get( "app:main", "object_store" ) == "irods"
}.get( egg_name, lambda: True )()
except:
return False
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -542,6 +542,9 @@
return DistributedObjectStore(config=config, fsmon=fsmon)
elif store == 'hierarchical':
return HierarchicalObjectStore()
+ elif store == 'irods':
+ from galaxy.objectstore.rods import IRODSObjectStore
+ return IRODSObjectStore(config=config)
else:
log.error("Unrecognized object store definition: {0}".format(store))
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee lib/galaxy/objectstore/rods.py
--- /dev/null
+++ b/lib/galaxy/objectstore/rods.py
@@ -0,0 +1,332 @@
+"""
+Object Store plugin for the Integrated Rule-Oriented Data Store (iRODS)
+
+The module is named rods to avoid conflicting with the PyRods module, irods
+"""
+
+import os
+import time
+import errno
+import logging
+#import traceback
+
+from posixpath import join as path_join
+from posixpath import basename as path_basename
+from posixpath import dirname as path_dirname
+
+from galaxy.objectstore import DiskObjectStore, ObjectStore, local_extra_dirs
+from galaxy.exceptions import ObjectNotFound, ObjectInvalid
+
+import galaxy.eggs
+galaxy.eggs.require( 'PyRods' )
+import irods
+
+log = logging.getLogger( __name__ )
+
+
+class IRODSObjectStore( DiskObjectStore, ObjectStore ):
+ """
+ Galaxy object store based on iRODS
+ """
+ def __init__( self, config, file_path=None, extra_dirs=None ):
+ super( IRODSObjectStore, self ).__init__( config, file_path=file_path, extra_dirs=extra_dirs )
+ self.cache_path = config.object_store_cache_path
+ self.default_resource = config.irods_default_resource or None
+
+ # Connect to iRODS (AssertionErrors will be raised if anything goes wrong)
+ self.rods_env, self.rods_conn = rods_connect()
+
+ # if the root collection path in the config is unset or relative, try to use a sensible default
+ if config.irods_root_collection_path is None or ( config.irods_root_collection_path is not None and not config.irods_root_collection_path.startswith( '/' ) ):
+ rods_home = self.rods_env.rodsHome
+ assert rods_home != '', "Unable to initialize iRODS Object Store: rodsHome cannot be determined and irods_root_collection_path in Galaxy config is unset or not absolute."
+ if config.irods_root_collection_path is None:
+ self.root_collection_path = path_join( rods_home, 'galaxy_data' )
+ else:
+ self.root_collection_path = path_join( rods_home, config.irods_root_collection_path )
+ else:
+ self.root_collection_path = config.irods_root_collection_path
+
+ # will return a collection object regardless of whether it exists
+ self.root_collection = irods.irodsCollection( self.rods_conn, self.root_collection_path )
+
+ if self.root_collection.getId() == -1:
+ log.warning( "iRODS root collection does not exist, will attempt to create: %s", self.root_collection_path )
+ self.root_collection.upCollection()
+ assert self.root_collection.createCollection( os.path.basename( self.root_collection_path ) ) == 0, "iRODS root collection creation failed: %s" % self.root_collection_path
+ self.root_collection = irods.irodsCollection( self.rods_conn, self.root_collection_path )
+ assert self.root_collection.getId() != -1, "iRODS root collection creation claimed success but still does not exist"
+
+ if self.default_resource is None:
+ self.default_resource = self.rods_env.rodsDefResource
+
+ log.info( "iRODS data for this instance will be stored in collection: %s, resource: %s", self.root_collection_path, self.default_resource )
+
+ def __get_rods_path( self, obj, base_dir=None, dir_only=False, extra_dir=None, extra_dir_at_root=False, alt_name=None, strip_dat=True, **kwargs ):
+ path = ""
+ if extra_dir is not None:
+ path = extra_dir
+
+ # extra_dir_at_root is ignored - since the iRODS plugin does not use
+ # the directory hash, there is only one level of subdirectory.
+
+ if not dir_only:
+ # the .dat extension is stripped when stored in iRODS
+ # TODO: is the strip_dat kwarg the best way to implement this?
+ if strip_dat and alt_name and alt_name.endswith( '.dat' ):
+ alt_name = os.path.splitext( alt_name )[0]
+ default_name = 'dataset_%s' % obj.id
+ if not strip_dat:
+ default_name += '.dat'
+ path = path_join( path, alt_name if alt_name else default_name )
+
+ path = path_join( self.root_collection_path, path )
+
+ #log.debug( 'iRODS path for %s %s is %s', obj.__class__.__name__, obj.id, path )
+
+ return path
+
+ def __get_cache_path( self, obj, **kwargs ):
+ # FIXME: does not handle collections
+ # FIXME: collisions could occur here
+ return os.path.join( self.cache_path, path_basename( self.__get_rods_path( obj, strip_dat=False, **kwargs ) ) )
+
+ def __clean_cache_entry( self, obj, **kwargs ):
+ # FIXME: does not handle collections
+ try:
+ os.unlink( self.__get_cache_path( obj, **kwargs ) )
+ except OSError:
+ # it is expected that we'll call this method a lot regardless of
+ # whether we think the cached file exists
+ pass
+
+ def __get_rods_handle( self, obj, mode='r', **kwargs ):
+ if kwargs.get( 'dir_only', False ):
+ return irods.irodsCollection( self.rods_conn, self.__get_rods_path( obj, **kwargs ) )
+ else:
+ return irods.irodsOpen( self.rods_conn, self.__get_rods_path( obj, **kwargs ), mode )
+
+ def __mkcolls( self, rods_path ):
+ """
+ An os.makedirs() for iRODS collections. `rods_path` is the desired collection to create.
+ """
+ assert rods_path.startswith( self.root_collection_path + '/' ), '__mkcolls(): Creating collections outside the root collection is not allowed (requested path was: %s)' % rods_path
+ mkcolls = []
+ c = irods.irodsCollection( self.rods_conn, rods_path )
+ while c.getId() == -1:
+ assert c.getCollName().startswith( self.root_collection_path + '/' ), '__mkcolls(): Attempted to move above the root collection: %s' % c.getCollName()
+ mkcolls.append( c.getCollName() )
+ c.upCollection()
+ for collname in reversed( mkcolls ):
+ log.debug( 'Creating collection %s' % collname )
+ ci = irods.collInp_t()
+ ci.collName = collname
+ status = rcCollCreate( self.rods_conn, ci )
+ assert status == 0, '__mkcolls(): Failed to create collection: %s' % collname
+
+ @local_extra_dirs
+ def exists( self, obj, **kwargs ):
+ doi = irods.dataObjInp_t()
+ doi.objPath = self.__get_rods_path( obj, **kwargs )
+ log.debug( 'exists(): checking: %s', doi.objPath )
+ return irods.rcObjStat( self.rods_conn, doi ) is not None
+
+ @local_extra_dirs
+ def create(self, obj, **kwargs):
+ if not self.exists( obj, **kwargs ):
+ rods_path = self.__get_rods_path( obj, **kwargs )
+ log.debug( 'create(): %s', rods_path )
+ dir_only = kwargs.get( 'dir_only', False )
+ # short circuit collection creation since most of the time it will
+ # be the root collection which already exists
+ collection_path = rods_path if dir_only else path_dirname( rods_path )
+ if collection_path != self.root_collection_path:
+ self.__mkcolls( collection_path )
+ if not dir_only:
+ # rcDataObjCreate is used instead of the irodsOpen wrapper so
+ # that we can prevent overwriting
+ doi = irods.dataObjInp_t()
+ doi.objPath = rods_path
+ doi.createMode = 0640
+ doi.dataSize = 0 # 0 actually means "unknown", although literally 0 would be preferable
+ irods.addKeyVal( doi.condInput, irods.DEST_RESC_NAME_KW, self.default_resource )
+ status = irods.rcDataObjCreate( self.rods_conn, doi )
+ assert status >= 0, 'create(): rcDataObjCreate() failed: %s: %s: %s' % ( rods_path, status, irods.strerror( status ) )
+
+ @local_extra_dirs
+ def empty( self, obj, **kwargs ):
+ assert 'dir_only' not in kwargs, 'empty(): `dir_only` parameter is invalid here'
+ h = self.__get_rods_handle( obj, **kwargs )
+ try:
+ return h.getSize() == 0
+ except AttributeError:
+ # h is None
+ raise ObjectNotFound()
+
+ def size( self, obj, **kwargs ):
+ assert 'dir_only' not in kwargs, 'size(): `dir_only` parameter is invalid here'
+ h = self.__get_rods_handle( obj, **kwargs )
+ try:
+ return h.getSize()
+ except AttributeError:
+ # h is None
+ return 0
+
+ @local_extra_dirs
+ def delete( self, obj, entire_dir=False, **kwargs ):
+ assert 'dir_only' not in kwargs, 'delete(): `dir_only` parameter is invalid here'
+ rods_path = self.__get_rods_path( obj, **kwargs )
+ # __get_rods_path prepends self.root_collection_path but we are going
+ # to ensure that it's valid anyway for safety's sake
+ assert rods_path.startswith( self.root_collection_path + '/' ), 'ERROR: attempt to delete object outside root collection (path was: %s)' % rods_path
+ if entire_dir:
+ # TODO
+ raise NotImplementedError()
+ h = self.__get_rods_handle( obj, **kwargs )
+ try:
+ # note: PyRods' irodsFile.delete() does not set force
+ status = h.delete()
+ assert status == 0, '%d: %s' % ( status, irods.strerror( status ) )
+ return True
+ except AttributeError:
+ log.warning( 'delete(): operation failed: object does not exist: %s', rods_path )
+ except AssertionError, e:
+ # delete() does not raise on deletion failure
+ log.error( 'delete(): operation failed: %s', e )
+ finally:
+ # remove the cached entry (finally is executed even when the try
+ # contains a return)
+ self.__clean_cache_entry( self, obj, **kwargs )
+ return False
+
+ @local_extra_dirs
+ def get_data( self, obj, start=0, count=-1, **kwargs ):
+ log.debug( 'get_data(): %s' )
+ h = self.__get_rods_handle( obj, **kwargs )
+ try:
+ h.seek( start )
+ except AttributeError:
+ raise ObjectNotFound()
+ if count == -1:
+ return h.read()
+ else:
+ return f.read( count )
+ # TODO: make sure implicit close is okay, DiskObjectStore actually
+ # reads data into a var, closes, and returns the var
+
+ @local_extra_dirs
+ def get_filename( self, obj, **kwargs ):
+ log.debug( "get_filename(): called on %s %s. For better performance, avoid this method and use get_data() instead.", obj.__class__.__name__, obj.id )
+
+ # For finding all places where get_filename is called...
+ #log.debug( ''.join( traceback.format_stack() ) )
+
+ cached_path = self.__get_cache_path( obj, **kwargs )
+
+ if not self.exists( obj, **kwargs ):
+ raise ObjectNotFound()
+
+ # TODO: implement or define whether dir_only is valid
+ if 'dir_only' in kwargs:
+ raise NotImplementedError()
+
+ # cache hit
+ if os.path.exists( cached_path ):
+ return os.path.abspath( cached_path )
+
+ # cache miss
+ # TODO: thread this
+ incoming_path = os.path.join( os.path.dirname( cached_path ), "__incoming_%s" % os.path.basename( cached_path ) )
+ doi = irods.dataObjInp_t()
+ doi.objPath = self.__get_rods_path( obj, **kwargs )
+ doi.dataSize = 0 # TODO: does this affect performance? should we get size?
+ doi.numThreads = 0
+ # TODO: might want to VERIFY_CHKSUM_KW
+ log.debug( 'get_filename(): caching %s to %s', doi.objPath, incoming_path )
+
+ # do the iget
+ status = irods.rcDataObjGet( self.rods_conn, doi, incoming_path )
+
+ # if incoming already exists, we'll wait for another process or thread
+ # to finish caching
+ if status != irods.OVERWRITE_WITHOUT_FORCE_FLAG:
+ assert status == 0, 'get_filename(): iget %s failed (%s): %s' % ( doi.objPath, status, irods.strerror( status ) )
+ # POSIX rename is atomic
+ # TODO: rename without clobbering
+ os.rename( incoming_path, cached_path )
+ log.debug( 'get_filename(): cached %s to %s', doi.objPath, cached_path )
+
+ # another process or thread is caching, wait for it
+ while not os.path.exists( cached_path ):
+ # TODO: force restart after mod time > some configurable, or
+ # otherwise deal with this potential deadlock and interrupted
+ # transfers
+ time.sleep( 5 )
+ log.debug( "get_filename(): waiting on incoming '%s' for %s %s", incoming_path, obj.__class__.__name__, obj.id )
+
+ return os.path.abspath( cached_path )
+
+ @local_extra_dirs
+ def update_from_file(self, obj, file_name=None, create=False, **kwargs):
+ assert 'dir_only' not in kwargs, 'update_from_file(): `dir_only` parameter is invalid here'
+
+ # do not create if not requested
+ if create and not self.exists( obj, **kwargs ):
+ raise ObjectNotFound()
+
+ if file_name is None:
+ file_name = self.__get_cache_path( obj, **kwargs )
+
+ # put will create if necessary
+ doi = irods.dataObjInp_t()
+ doi.objPath = self.__get_rods_path( obj, **kwargs )
+ doi.createMode = 0640
+ doi.dataSize = os.stat( file_name ).st_size
+ doi.numThreads = 0
+ irods.addKeyVal( doi.condInput, irods.DEST_RESC_NAME_KW, self.default_resource )
+ irods.addKeyVal( doi.condInput, irods.FORCE_FLAG_KW, '' )
+ # TODO: might want to VERIFY_CHKSUM_KW
+ log.debug( 'update_from_file(): updating %s to %s', file_name, doi.objPath )
+
+ # do the iput
+ status = irods.rcDataObjPut( self.rods_conn, doi, file_name )
+ assert status == 0, 'update_from_file(): iput %s failed (%s): %s' % ( doi.objPath, status, irods.strerror( status ) )
+
+ def get_object_url(self, obj, **kwargs):
+ return None
+
+ def get_store_usage_percent(self):
+ return 0.0
+
+# monkeypatch an strerror method into the irods module
+def _rods_strerror( errno ):
+ """
+ The missing `strerror` for iRODS error codes
+ """
+ if not hasattr( irods, '__rods_strerror_map' ):
+ irods.__rods_strerror_map = {}
+ for name in dir( irods ):
+ v = getattr( irods, name )
+ if type( v ) == int and v < 0:
+ irods.__rods_strerror_map[ v ] = name
+ return irods.__rods_strerror_map.get( errno, 'GALAXY_NO_ERRNO_MAPPING_FOUND' )
+
+irods.strerror = _rods_strerror
+
+def rods_connect():
+ """
+ A basic iRODS connection mechanism that connects using the current iRODS
+ environment
+ """
+ status, env = irods.getRodsEnv()
+ assert status == 0, 'connect(): getRodsEnv() failed (%s): %s' % ( status, irods.strerror( status ) )
+ conn, err = irods.rcConnect( env.rodsHost,
+ env.rodsPort,
+ env.rodsUserName,
+ env.rodsZone )
+ assert err.status == 0, 'connect(): rcConnect() failed (%s): %s' % ( err.status, err.msg )
+ status, pw = irods.obfGetPw()
+ assert status == 0, 'connect(): getting password with obfGetPw() failed (%s): %s' % ( status, irods.strerror( status ) )
+ status = irods.clientLoginWithObfPassword( conn, pw )
+ assert status == 0, 'connect(): logging in with clientLoginWithObfPassword() failed (%s): %s' % ( status, irods.strerror( status ) )
+ return env, conn
diff -r 75bcfb029e8c5dd8e3d78829469a8583c73055ae -r fc4e1a162195e45f69573724adec564ffe1ea9ee scripts/scramble/scripts/PyRods.py
--- /dev/null
+++ b/scripts/scramble/scripts/PyRods.py
@@ -0,0 +1,33 @@
+import os, sys
+import subprocess
+
+# change back to the build dir
+if os.path.dirname( sys.argv[0] ) != "":
+ os.chdir( os.path.dirname( sys.argv[0] ) )
+
+# find setuptools
+sys.path.append( os.path.join( '..', '..', '..', 'lib' ) )
+from scramble_lib import *
+
+tag = get_tag() # get the tag
+get_deps() # require any dependent eggs
+clean() # clean up any existing stuff (could happen if you run scramble.py by hand)
+
+subprocess.check_call( "./scripts/configure", shell=True )
+subprocess.check_call( "CFLAGS='-fPIC' make clients", shell=True )
+
+# reset args for distutils
+me = sys.argv[0]
+sys.argv = [ me ]
+sys.argv.append( "egg_info" )
+if tag is not None:
+ sys.argv.append( "--tag-build=%s" %tag )
+# svn revision (if any) is handled directly in tag-build
+sys.argv.append( "--no-svn-revision" )
+sys.argv.append( "bdist_egg" )
+
+# apply patches (if any)
+apply_patches()
+
+# do it
+execfile( "setup.py", globals(), locals() )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ee6d553f7847/
Changeset: ee6d553f7847
Branch: stable
User: natefoo
Date: 2013-08-28 22:02:16
Summary: Logic on DiskObjectStore's empty() method was reversed (previously returned True when non-empty).
Affected #: 1 file
diff -r de04c251c6cae5760fd13c83030a6aab78ae0c4e -r ee6d553f7847ec47cca0cf205c767d1407eccbab lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -297,7 +297,7 @@
util.umask_fix_perms(path, self.config.umask, 0666)
def empty(self, obj, **kwargs):
- return os.path.getsize(self.get_filename(obj, **kwargs)) > 0
+ return os.path.getsize(self.get_filename(obj, **kwargs)) == 0
def size(self, obj, **kwargs):
if self.exists(obj, **kwargs):
https://bitbucket.org/galaxy/galaxy-central/commits/f2677acb7d77/
Changeset: f2677acb7d77
User: natefoo
Date: 2013-08-28 22:02:35
Summary: merge stable.
Affected #: 2 files
diff -r a60d756aeb5d40c62854fda8a5f5be274762cd86 -r f2677acb7d775a4d9ca26fc78a003dab060a0e8b lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -286,7 +286,7 @@
util.umask_fix_perms(path, self.config.umask, 0666)
def empty(self, obj, **kwargs):
- return os.path.getsize(self.get_filename(obj, **kwargs)) > 0
+ return os.path.getsize(self.get_filename(obj, **kwargs)) == 0
def size(self, obj, **kwargs):
if self.exists(obj, **kwargs):
https://bitbucket.org/galaxy/galaxy-central/commits/4fea98291cbc/
Changeset: 4fea98291cbc
User: natefoo
Date: 2013-08-28 22:04:59
Summary: Remove S3 connection method from objectstore, missed when S3 was moved to its own module.
Affected #: 1 file
diff -r f2677acb7d775a4d9ca26fc78a003dab060a0e8b -r 4fea98291cbce9a0e8d580bfd9c4ef4a5184c680 lib/galaxy/objectstore/__init__.py
--- a/lib/galaxy/objectstore/__init__.py
+++ b/lib/galaxy/objectstore/__init__.py
@@ -565,25 +565,3 @@
else:
size = '%.2fb' % bytes
return size
-
-def get_OS_connection(config):
- """
- Get a connection object for a cloud Object Store specified in the config.
- Currently, this is a ``boto`` connection object.
- """
- log.debug("Getting a connection object for '{0}' object store".format(config.object_store))
- a_key = config.os_access_key
- s_key = config.os_secret_key
- if config.object_store == 's3':
- return S3Connection(a_key, s_key)
- else:
- # Establish the connection now
- calling_format = boto.s3.connection.OrdinaryCallingFormat()
- s3_conn = boto.connect_s3(aws_access_key_id=a_key,
- aws_secret_access_key=s_key,
- is_secure=config.os_is_secure,
- host=config.os_host,
- port=int(config.os_port),
- calling_format=calling_format,
- path=config.os_conn_path)
- return s3_conn
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: carlfeberhard: Datatypes: temporarily remove graph datatype sniffers (f3a985005267) until they can be made more discriminating
by commits-noreply@bitbucket.org 28 Aug '13
by commits-noreply@bitbucket.org 28 Aug '13
28 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a60d756aeb5d/
Changeset: a60d756aeb5d
User: carlfeberhard
Date: 2013-08-28 20:22:27
Summary: Datatypes: temporarily remove graph datatype sniffers (f3a985005267) until they can be made more discriminating
Affected #: 1 file
diff -r 22a4f03c1fe40dedcb7e6f11510d58ada8e9c458 -r a60d756aeb5d40c62854fda8a5f5be274762cd86 datatypes_conf.xml.sample
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -285,9 +285,6 @@
<sniffer type="galaxy.datatypes.tabular:Sam"/><sniffer type="galaxy.datatypes.data:Newick"/><sniffer type="galaxy.datatypes.data:Nexus"/>
- <sniffer type="galaxy.datatypes.graph:Xgmml"/>
- <sniffer type="galaxy.datatypes.graph:Sif"/>
- <sniffer type="galaxy.datatypes.graph:Rdf"/><sniffer type="galaxy.datatypes.images:Jpg"/><sniffer type="galaxy.datatypes.images:Png"/><sniffer type="galaxy.datatypes.images:Tiff"/>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: Dave Bouvier: Handle the case where the repository being installed has a newer downloadable changeset revision available. (Generally restricted to the new tool_dependency_definition repository type)
by commits-noreply@bitbucket.org 28 Aug '13
by commits-noreply@bitbucket.org 28 Aug '13
28 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/22a4f03c1fe4/
Changeset: 22a4f03c1fe4
User: Dave Bouvier
Date: 2013-08-28 15:54:45
Summary: Handle the case where the repository being installed has a newer downloadable changeset revision available. (Generally restricted to the new tool_dependency_definition repository type)
Affected #: 1 file
diff -r 29110e49c311339c521525f0b0884ce8eb172129 -r 22a4f03c1fe40dedcb7e6f11510d58ada8e9c458 lib/tool_shed/galaxy_install/repository_util.py
--- a/lib/tool_shed/galaxy_install/repository_util.py
+++ b/lib/tool_shed/galaxy_install/repository_util.py
@@ -214,24 +214,39 @@
def get_repo_info_dict( trans, repository_id, changeset_revision ):
repository = suc.get_repository_in_tool_shed( trans, repository_id )
+ repo_dir = repository.repo_path( trans.app )
+ repo = hg.repository( suc.get_configured_ui(), repo_dir )
repository_clone_url = suc.generate_clone_url_for_repository_in_tool_shed( trans, repository )
repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision )
- metadata = repository_metadata.metadata
- if 'tools' in metadata:
- includes_tools = True
+ if not repository_metadata:
+ # The received changeset_revision is no longer installable, so get the next changeset_revision in the repository's changelog.
+ # This generally occurs only with repositories of type tool_dependency_definition.
+ next_downloadable_changeset_revision = suc.get_next_downloadable_changeset_revision( repository, repo, changeset_revision )
+ if next_downloadable_changeset_revision:
+ repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, next_downloadable_changeset_revision )
+ if repository_metadata:
+ # For now, we'll always assume that we'll get repository_metadata, but if we discover our assumption is not valid we'll have to
+ # enhance the callers to handle repository_metadata values of None in the returned repo_info_dict.
+ metadata = repository_metadata.metadata
+ if 'tools' in metadata:
+ includes_tools = True
+ else:
+ includes_tools = False
+ includes_tools_for_display_in_tool_panel = repository_metadata.includes_tools_for_display_in_tool_panel
+ if 'repository_dependencies' in metadata:
+ has_repository_dependencies = True
+ else:
+ has_repository_dependencies = False
+ if 'tool_dependencies' in metadata:
+ includes_tool_dependencies = True
+ else:
+ includes_tool_dependencies = False
else:
+ # Here's where we may have to handle enhancements to the callers. See above comment.
includes_tools = False
- includes_tools_for_display_in_tool_panel = repository_metadata.includes_tools_for_display_in_tool_panel
- if 'repository_dependencies' in metadata:
- has_repository_dependencies = True
- else:
has_repository_dependencies = False
- if 'tool_dependencies' in metadata:
- includes_tool_dependencies = True
- else:
includes_tool_dependencies = False
- repo_dir = repository.repo_path( trans.app )
- repo = hg.repository( suc.get_configured_ui(), repo_dir )
+ includes_tools_for_display_in_tool_panel = False
ctx = suc.get_changectx_for_changeset( repo, changeset_revision )
repo_info_dict = create_repo_info_dict( trans=trans,
repository_clone_url=repository_clone_url,
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Add pipe (|) to the set of VALID_CHARS in shed_util_common.py. Fixes an issue with e.g. ReST display. TODO: Revisit this method and its usage throughout the toolshed and the toolshed interaction with Galaxy: e.g. is it still needed everywhere it is being used, and is it still doing what it is supposed to be doing?
by commits-noreply@bitbucket.org 27 Aug '13
by commits-noreply@bitbucket.org 27 Aug '13
27 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/29110e49c311/
Changeset: 29110e49c311
User: dan
Date: 2013-08-27 22:21:16
Summary: Add pipe (|) to the set of VALID_CHARS in shed_util_common.py. Fixes an issue with e.g. ReST display. TODO: Revisit this method and its usage throughout the toolshed and the toolshed interaction with Galaxy: e.g. is it still needed everywhere it is being used, and is it still doing what it is supposed to be doing?
Affected #: 1 file
diff -r f8b3dbe32435516af63e449cedb2e2fc9eb5bf26 -r 29110e49c311339c521525f0b0884ce8eb172129 lib/tool_shed/util/shed_util_common.py
--- a/lib/tool_shed/util/shed_util_common.py
+++ b/lib/tool_shed/util/shed_util_common.py
@@ -37,7 +37,7 @@
INITIAL_CHANGELOG_HASH = '000000000000'
MAX_CONTENT_SIZE = 1048576
MAX_DISPLAY_SIZE = 32768
-VALID_CHARS = set( string.letters + string.digits + "'\"-=_.()/+*^,:?!#[]%\\$@;{}&<>" )
+VALID_CHARS = set( string.letters + string.digits + "'\"-=_.()/+*^,:?!#[]%\\$@;{}&<>|" )
DATATYPES_CONFIG_FILENAME = 'datatypes_conf.xml'
REPOSITORY_DATA_MANAGER_CONFIG_FILENAME = 'data_manager_conf.xml'
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Enhance the installed repositories container on the Manage repository page in Galaxy to properly display mising repositroy and tool dependencies for an installed repository.
by commits-noreply@bitbucket.org 27 Aug '13
by commits-noreply@bitbucket.org 27 Aug '13
27 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f8b3dbe32435/
Changeset: f8b3dbe32435
User: greg
Date: 2013-08-27 20:51:33
Summary: Enhance the installed repositories container on the Manage repository page in Galaxy to properly display mising repositroy and tool dependencies for an installed repository.
Affected #: 1 file
diff -r 6dfd50e1cfd1e2b9f356cb9e9319f85caf6a74f3 -r f8b3dbe32435516af63e449cedb2e2fc9eb5bf26 lib/tool_shed/util/container_util.py
--- a/lib/tool_shed/util/container_util.py
+++ b/lib/tool_shed/util/container_util.py
@@ -1265,6 +1265,35 @@
return get_folder( sub_folder, key )
return None
+def get_components_from_repository_dependency_for_installed_repository( trans, repository_dependency ):
+ """
+ Parse a repository dependency and return components necessary for proper display in Galaxy on the Manage repository page.
+ """
+ if len( repository_dependency ) == 6:
+ # Metadata should have been reset on this installed repository, but it wasn't.
+ tool_shed_repository_id = repository_dependency[ 4 ]
+ installation_status = repository_dependency[ 5 ]
+ tool_shed, name, owner, changeset_revision = repository_dependency[ 0:4 ]
+ # Default prior_installation_required to False.
+ prior_installation_required = False
+ repository_dependency = [ tool_shed, name, owner, changeset_revision, prior_installation_required ]
+ elif len( repository_dependency ) == 7:
+ # We have a repository dependency tuple that includes a prior_installation_required value.
+ tool_shed_repository_id = repository_dependency[ 5 ]
+ installation_status = repository_dependency[ 6 ]
+ repository_dependency = repository_dependency[ 0:5 ]
+ else:
+ tool_shed_repository_id = None
+ installation_status = 'unknown'
+ if tool_shed_repository_id:
+ tool_shed_repository = suc.get_tool_shed_repository_by_id( trans, trans.security.encode_id( tool_shed_repository_id ) )
+ if tool_shed_repository:
+ if tool_shed_repository.missing_repository_dependencies:
+ installation_status = '%s, missing repository dependencies' % installation_status
+ elif tool_shed_repository.missing_tool_dependencies:
+ installation_status = '%s, missing tool dependencies' % installation_status
+ return tool_shed_repository_id, installation_status, repository_dependency
+
def get_components_from_key( key ):
# FIXME: assumes tool shed is current tool shed since repository dependencies across tool sheds is not yet supported.
items = key.split( STRSEP )
@@ -1315,22 +1344,8 @@
sub_folder.repository_dependencies.append( repository_dependency )
for repository_dependency in rd_value:
if trans.webapp.name == 'galaxy':
- if len( repository_dependency ) == 6:
- # Metadata should have been reset on this installed repository, but it wasn't.
- tool_shed_repository_id = repository_dependency[ 4 ]
- installation_status = repository_dependency[ 5 ]
- tool_shed, name, owner, changeset_revision = repository_dependency[ 0:4 ]
- # Default prior_installation_required to False.
- prior_installation_required = False
- repository_dependency = [ tool_shed, name, owner, changeset_revision, prior_installation_required ]
- elif len( repository_dependency ) == 7:
- # We have a repository dependency tuple that includes a prior_installation_required value.
- tool_shed_repository_id = repository_dependency[ 5 ]
- installation_status = repository_dependency[ 6 ]
- repository_dependency = repository_dependency[ 0:5 ]
- else:
- tool_shed_repository_id = None
- installation_status = 'unknown'
+ tool_shed_repository_id, installation_status, repository_dependency = \
+ get_components_from_repository_dependency_for_installed_repository( trans, repository_dependency )
else:
tool_shed_repository_id = None
installation_status = None
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: Dave Bouvier: Correctly handle the case where a repository installs correctly, but it depends on a repository with a tool dependency that is in an error state.
by commits-noreply@bitbucket.org 27 Aug '13
by commits-noreply@bitbucket.org 27 Aug '13
27 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6dfd50e1cfd1/
Changeset: 6dfd50e1cfd1
User: Dave Bouvier
Date: 2013-08-27 19:50:30
Summary: Correctly handle the case where a repository installs correctly, but it depends on a repository with a tool dependency that is in an error state.
Affected #: 1 file
diff -r 6439459c265ea7748ff9a16706fa5af5cc224269 -r 6dfd50e1cfd1e2b9f356cb9e9319f85caf6a74f3 test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -269,6 +269,14 @@
url += '&%s' % params
return url
+def get_failed_tool_dependencies( repository ):
+ missing_dependencies = repository.missing_tool_dependencies
+ for repository_dependency in repository.repository_dependencies:
+ if not repository_dependency.includes_tool_dependencies:
+ continue
+ missing_dependencies.extend( get_failed_tool_dependencies( repository_dependency ) )
+ return missing_dependencies
+
def get_latest_downloadable_changeset_revision( url, name, owner ):
api_url_parts = [ 'api', 'repositories', 'get_ordered_installable_revisions' ]
params = urllib.urlencode( dict( name=name, owner=owner ) )
@@ -459,7 +467,7 @@
Update the repository metadata tool_test_results and appropriate flags using the API.
'''
params[ 'tool_test_results' ] = test_results_dict
- if '-info_only' in sys.argv:
+ if '-info_only' in sys.argv or 'GALAXY_INSTALL_TEST_INFO_ONLY' in os.environ:
return {}
else:
return update( tool_shed_api_key, '%s' % ( url_join( galaxy_tool_shed_url, 'api', 'repository_revisions', metadata_id ) ), params, return_formatted=False )
@@ -914,7 +922,7 @@
# "reason": "The Galaxy development team has determined that this repository should not be installed and tested by the automated framework."
# }
# }
- failed_tool_dependencies = repository.includes_tool_dependencies and repository.tool_dependencies_with_installation_errors
+ failed_tool_dependencies = get_failed_tool_dependencies( repository )
failed_repository_dependencies = repository.repository_dependencies_with_installation_errors
if 'missing_test_components' not in repository_status:
repository_status[ 'missing_test_components' ] = []
@@ -958,7 +966,7 @@
log.error( 'One or more tool dependencies of this repository are marked as missing.' )
log.error( 'Updating repository and skipping functional tests.' )
# In keeping with the standard display layout, add the error message to the dict for each tool individually.
- for dependency in repository.tool_dependencies_with_installation_errors:
+ for dependency in failed_tool_dependencies:
test_result = dict( type=dependency.type,
name=dependency.name,
version=dependency.version,
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Send changeset_revision to method that renders the Repository Actions pop-up menu in the tool shed to ensure the desired repository revision is used when choosing actions.
by commits-noreply@bitbucket.org 27 Aug '13
by commits-noreply@bitbucket.org 27 Aug '13
27 Aug '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6439459c265e/
Changeset: 6439459c265e
User: greg
Date: 2013-08-27 19:24:37
Summary: Send changeset_revision to method that renders the Repository Actions pop-up menu in the tool shed to ensure the desired repository revision is used when choosing actions.
Affected #: 5 files
diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -664,10 +664,12 @@
repo = hg.repository( suc.get_configured_ui(), repository.repo_path( trans.app ) )
# Update repository files for browsing.
suc.update_repository( repo )
- metadata = self.get_metadata( trans, id, repository.tip( trans.app ) )
+ changeset_revision = repository.tip( trans.app )
+ metadata = self.get_metadata( trans, id, changeset_revision )
repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository )
return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako',
repository=repository,
+ changeset_revision=changeset_revision,
metadata=metadata,
commit_message=commit_message,
repository_type_select_field=repository_type_select_field,
@@ -1102,6 +1104,7 @@
repositories_archive_filename = os.path.basename( repositories_archive.name )
if error_message:
message = error_message
+ status = 'error'
else:
trans.response.set_content_type( 'application/x-gzip' )
trans.response.headers[ "Content-Disposition" ] = 'attachment; filename="%s"' % ( repositories_archive_filename )
@@ -1109,9 +1112,7 @@
# Make sure the file is removed from disk after the contents have been downloaded.
os.unlink( repositories_archive.name )
return opened_archive
- repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans,
- trans.security.encode_id( repository.id ),
- changeset_revision )
+ repository_metadata = suc.get_repository_metadata_by_changeset_revision( trans, repository_id, changeset_revision )
metadata = repository_metadata.metadata
# Get a dictionary of all repositories upon which the contents of the current repository_metadata record depend.
repository_dependencies = \
@@ -1822,6 +1823,10 @@
return trans.fill_template( '/webapps/tool_shed/repository/help.mako', message=message, status=status, **kwd )
@web.expose
+ def import_capsule( self, trans, **kwd ):
+ pass
+
+ @web.expose
def index( self, trans, **kwd ):
message = kwd.get( 'message', '' )
status = kwd.get( 'status', 'done' )
@@ -2449,9 +2454,11 @@
message = "Select at least 1 file to delete from the repository before clicking <b>Delete selected files</b>."
status = "error"
repository_type_select_field = rt_util.build_repository_type_select_field( trans, repository=repository )
+ changeset_revision = repository.tip( trans.app )
return trans.fill_template( '/webapps/tool_shed/repository/browse_repository.mako',
repo=repo,
repository=repository,
+ changeset_revision=changeset_revision,
commit_message=commit_message,
repository_type_select_field=repository_type_select_field,
message=message,
diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 lib/galaxy/webapps/tool_shed/controllers/upload.py
--- a/lib/galaxy/webapps/tool_shed/controllers/upload.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/upload.py
@@ -241,6 +241,7 @@
selected_categories = [ trans.security.decode_id( id ) for id in category_ids ]
return trans.fill_template( '/webapps/tool_shed/repository/upload.mako',
repository=repository,
+ changeset_revision=tip,
url=url,
commit_message=commit_message,
uncompress_file=uncompress_file,
diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/index.mako
--- a/templates/webapps/tool_shed/index.mako
+++ b/templates/webapps/tool_shed/index.mako
@@ -147,6 +147,9 @@
<div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='repository', action='create_repository' )}">Create new repository</a></div>
+ <div class="toolTitle">
+ <a target="galaxy_main" href="${h.url_for( controller='repository', action='import_capsule' )}">Import repository capsule</a>
+ </div>
%if can_review_repositories:
<div class="toolSectionPad"></div><div class="toolSectionTitle">
diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/repository/browse_repository.mako
--- a/templates/webapps/tool_shed/repository/browse_repository.mako
+++ b/templates/webapps/tool_shed/repository/browse_repository.mako
@@ -31,7 +31,7 @@
can_browse_contents = not is_new
%>
-${render_tool_shed_repository_actions( repository )}
+${render_tool_shed_repository_actions( repository, changeset_revision=changeset_revision )}
%if message:
${render_msg( message, status )}
diff -r d7ea2536e8e370cd202f735351c37264270ddbaf -r 6439459c265ea7748ff9a16706fa5af5cc224269 templates/webapps/tool_shed/repository/rate_repository.mako
--- a/templates/webapps/tool_shed/repository/rate_repository.mako
+++ b/templates/webapps/tool_shed/repository/rate_repository.mako
@@ -33,7 +33,7 @@
${render_msg( message, status )}
%endif
-${render_tool_shed_repository_actions( repository, repo=None, metadata=None, changeset_revision=None )}
+${render_tool_shed_repository_actions( repository, metadata=None, changeset_revision=None )}
%if repository.user != trans.user:
<div class="toolForm">
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/19c4ec5b8faf/
Changeset: 19c4ec5b8faf
User: jgoecks
Date: 2013-08-26 23:36:50
Summary: Use Galaxy root to dynamically load CSS files.
Affected #: 3 files
diff -r dd8329aa8d9e84397fd226adb9e54589bd1aea2f -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 static/scripts/galaxy.frame.js
--- a/static/scripts/galaxy.frame.js
+++ b/static/scripts/galaxy.frame.js
@@ -74,7 +74,7 @@
initialize : function(options)
{
// load required css files
- css.load_file(options.root + "static/style/galaxy.frame.css");
+ css.load_file("static/style/galaxy.frame.css");
// read in defaults
if (options)
diff -r dd8329aa8d9e84397fd226adb9e54589bd1aea2f -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 static/scripts/utils/galaxy.css.js
--- a/static/scripts/utils/galaxy.css.js
+++ b/static/scripts/utils/galaxy.css.js
@@ -29,7 +29,7 @@
{
// check if css is already available
if (!$('link[href^="' + url + '"]').length)
- $('<link href="' + url + '" rel="stylesheet">').appendTo('head');
+ $('<link href="' + galaxy_config.root + url + '" rel="stylesheet">').appendTo('head');
};
// return
diff -r dd8329aa8d9e84397fd226adb9e54589bd1aea2f -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 static/scripts/viz/trackster.js
--- a/static/scripts/viz/trackster.js
+++ b/static/scripts/viz/trackster.js
@@ -21,12 +21,12 @@
], function(css)
{
// load css
- css.load_file("/static/style/jquery.rating.css");
- css.load_file("/static/style/history.css");
- css.load_file("/static/style/autocomplete_tagging.css");
- css.load_file("/static/style/jquery-ui/smoothness/jquery-ui.css");
- css.load_file("/static/style/library.css");
- css.load_file("/static/style/trackster.css");
+ css.load_file("static/style/jquery.rating.css");
+ css.load_file("static/style/history.css");
+ css.load_file("static/style/autocomplete_tagging.css");
+ css.load_file("static/style/jquery-ui/smoothness/jquery-ui.css");
+ css.load_file("static/style/library.css");
+ css.load_file("static/style/trackster.css");
});
// trackster viewer
https://bitbucket.org/galaxy/galaxy-central/commits/d7ea2536e8e3/
Changeset: d7ea2536e8e3
User: jgoecks
Date: 2013-08-26 23:38:00
Summary: Pack scripts.
Affected #: 3 files
diff -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 -r d7ea2536e8e370cd202f735351c37264270ddbaf static/scripts/packed/galaxy.frame.js
--- a/static/scripts/packed/galaxy.frame.js
+++ b/static/scripts/packed/galaxy.frame.js
@@ -1,1 +1,1 @@
-define(["utils/galaxy.css","libs/backbone/backbone-relational"],function(b){var a=Backbone.View.extend({el:"#everything",el_header:"#masthead",options:{frame:{cols:6,rows:3},rows:1000,cell:130,margin:5,scroll:5,top_min:40,frame_max:10},cols:0,top:0,top_max:0,frame_counter:0,frame_counter_id:0,frame_list:[],galaxy_frame_shadow:null,visible:false,active:false,initialize:function(d){b.load_file(d.root+"static/style/galaxy.frame.css");if(d){this.options=_.defaults(d,this.options)}this.top=this.top_max=this.options.top_min;$(this.el).append(this.frame_template_background());$(this.el).append(this.frame_template_menu());$(this.el_header).append(this.frame_template_header());var e="#galaxy-frame-shadow";$(this.el).append(this.frame_template_shadow(e.substring(1)));this.galaxy_frame_shadow={id:e,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};this.frame_resize(this.galaxy_frame_shadow,{width:0,height:0});this.frame_list[e]=this.galaxy_frame_shadow;this.panel_refresh();this.event_initialize();$(".galaxy-frame-active").tooltip({title:"Enable/Disable Scratchbook"});$(".galaxy-frame-load").tooltip({title:"Show/Hide Scratchbook"});var c=this;$(window).resize(function(){c.panel_refresh()});window.onbeforeunload=function(){if(c.frame_counter>0){return"You opened "+c.frame_counter+" frame(s) which will be lost."}}},is_mobile:function(){return navigator.userAgent.match(/mobile|(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)},event:{type:null,target:null,xy:null},event_initialize:function(){this.events={mousemove:"event_frame_mouse_move",mouseup:"event_frame_mouse_up",mouseleave:"event_frame_mouse_up",mousewheel:"event_panel_scroll",DOMMouseScroll:"event_panel_scroll","mousedown .galaxy-frame":"event_frame_mouse_down","mousedown .galaxy-frame-active":"event_panel_active","mousedown .galaxy-frame-load":"event_panel_load","mousedown .galaxy-frame-background":"event_panel_load","mousedown .galaxy-frame-scroll-up":"event_panel_scroll_up","mousedown .galaxy-frame-scroll-down":"event_panel_scroll_down","mousedown .f-close":"event_frame_close","mousedown .f-pin":"event_frame_lock"};this.delegateEvents(this.events)},event_frame_mouse_down:function(c){if(this.event.type!==null){return}if($(c.target).hasClass("f-header")||$(c.target).hasClass("f-title")){this.event.type="drag"}if($(c.target).hasClass("f-resize")){this.event.type="resize"}if(this.event.type===null){return}c.preventDefault();this.event.target=this.event_get_frame(c.target);if(this.event.target.grid_lock){this.event.type=null;return}this.event.xy={x:c.originalEvent.pageX,y:c.originalEvent.pageY};this.frame_drag_start(this.event.target)},event_frame_mouse_move:function(i){if(this.event.type!="drag"&&this.event.type!="resize"){return}var g={x:i.originalEvent.pageX,y:i.originalEvent.pageY};var d={x:g.x-this.event.xy.x,y:g.y-this.event.xy.y};this.event.xy=g;var h=this.frame_screen(this.event.target);if(this.event.type=="resize"){h.width+=d.x;h.height+=d.y;var f=this.options.cell-this.options.margin-1;h.width=Math.max(h.width,f);h.height=Math.max(h.height,f);this.frame_resize(this.event.target,h);h.width=this.to_grid_coord("width",h.width)+1;h.height=this.to_grid_coord("height",h.height)+1;h.width=this.to_pixel_coord("width",h.width);h.height=this.to_pixel_coord("height",h.height);this.frame_resize(this.galaxy_frame_shadow,h);this.frame_insert(this.galaxy_frame_shadow,{top:this.to_grid_coord("top",h.top),left:this.to_grid_coord("left",h.left)})}if(this.event.type=="drag"){h.left+=d.x;h.top+=d.y;this.frame_offset(this.event.target,h);var c={top:this.to_grid_coord("top",h.top),left:this.to_grid_coord("left",h.left)};if(c.left!==0){c.left++}this.frame_insert(this.galaxy_frame_shadow,c)}},event_frame_mouse_up:function(c){if(this.event.type!="drag"&&this.event.type!="resize"){return}this.frame_drag_stop(this.event.target);this.event.type=null},event_frame_close:function(d){if(this.event.type!==null){return}d.preventDefault();var f=this.event_get_frame(d.target);var c=this;$(f.id).fadeOut("fast",function(){$(f.id).remove();delete c.frame_list[f.id];c.frame_counter--;c.panel_refresh(true);c.panel_animation_complete();if(c.visible&&c.frame_counter==0){c.panel_show_hide()}})},event_frame_lock:function(c){if(this.event.type!==null){return}c.preventDefault();var d=this.event_get_frame(c.target);if(d.grid_lock){d.grid_lock=false;$(d.id).find(".f-pin").removeClass("f-toggle");$(d.id).find(".f-header").removeClass("f-not-allowed");$(d.id).find(".f-title").removeClass("f-not-allowed");$(d.id).find(".f-resize").show();$(d.id).find(".f-close").show()}else{d.grid_lock=true;$(d.id).find(".f-pin").addClass("f-toggle");$(d.id).find(".f-header").addClass("f-not-allowed");$(d.id).find(".f-title").addClass("f-not-allowed");$(d.id).find(".f-resize").hide();$(d.id).find(".f-close").hide()}},event_panel_load:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_show_hide()},event_panel_active:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_active_disable()},event_panel_scroll:function(c){if(this.event.type!==null||!this.visible){return}c.preventDefault();var d=c.originalEvent.detail?c.originalEvent.detail:c.originalEvent.wheelDelta/-3;this.panel_scroll(d)},event_panel_scroll_up:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_scroll(-this.options.scroll)},event_panel_scroll_down:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_scroll(this.options.scroll)},event_get_frame:function(c){return this.frame_list["#"+$(c).closest(".galaxy-frame").attr("id")]},frame_drag_start:function(d){this.frame_focus(d,true);var c=this.frame_screen(d);this.frame_resize(this.galaxy_frame_shadow,c);this.frame_grid(this.galaxy_frame_shadow,d.grid_location);d.grid_location=null;$(this.galaxy_frame_shadow.id).show();$(".f-cover").show()},frame_drag_stop:function(d){this.frame_focus(d,false);var c=this.frame_screen(this.galaxy_frame_shadow);this.frame_resize(d,c);this.frame_grid(d,this.galaxy_frame_shadow.grid_location,true);this.galaxy_frame_shadow.grid_location=null;$(this.galaxy_frame_shadow.id).hide();$(".f-cover").hide();this.panel_animation_complete()},to_grid_coord:function(e,d){var c=(e=="width"||e=="height")?1:-1;if(e=="top"){d-=this.top}return parseInt((d+c*this.options.margin)/this.options.cell,10)},to_pixel_coord:function(e,f){var c=(e=="width"||e=="height")?1:-1;var d=(f*this.options.cell)-c*this.options.margin;if(e=="top"){d+=this.top}return d},to_grid:function(c){return{top:this.to_grid_coord("top",c.top),left:this.to_grid_coord("left",c.left),width:this.to_grid_coord("width",c.width),height:this.to_grid_coord("height",c.height)}},to_pixel:function(c){return{top:this.to_pixel_coord("top",c.top),left:this.to_pixel_coord("left",c.left),width:this.to_pixel_coord("width",c.width),height:this.to_pixel_coord("height",c.height)}},is_collision:function(e){function c(h,g){return !(h.left>g.left+g.width-1||h.left+h.width-1<g.left||h.top>g.top+g.height-1||h.top+h.height-1<g.top)}for(var d in this.frame_list){var f=this.frame_list[d];if(f.grid_location===null){continue}if(c(e,f.grid_location)){return true}}return false},location_rank:function(c){return(c.top*this.cols)+c.left},menu_refresh:function(){$(".galaxy-frame-load .number").text(this.frame_counter);if(this.frame_counter==0){$(".galaxy-frame-load").hide()}else{$(".galaxy-frame-load").show()}if(this.top==this.options.top_min){$(".galaxy-frame-scroll-up").hide()}else{$(".galaxy-frame-scroll-up").show()}if(this.top==this.top_max){$(".galaxy-frame-scroll-down").hide()}else{$(".galaxy-frame-scroll-down").show()}},panel_animation_complete:function(){var c=this;$(".galaxy-frame").promise().done(function(){c.panel_scroll(0,true)})},panel_refresh:function(c){this.cols=parseInt($(window).width()/this.options.cell,10)+1;this.frame_insert(null,null,c)},panel_scroll:function(h,c){var e=this.top-this.options.scroll*h;e=Math.max(e,this.top_max);e=Math.min(e,this.options.top_min);if(this.top!=e){for(var d in this.frame_list){var g=this.frame_list[d];if(g.grid_location!==null){var f={top:g.screen_location.top-(this.top-e),left:g.screen_location.left};this.frame_offset(g,f,c)}}this.top=e}this.menu_refresh()},panel_show_hide:function(){if(this.visible){this.visible=false;$(".galaxy-frame").fadeOut("fast");$(".galaxy-frame-load .icon").addClass("fa-icon-eye-close");$(".galaxy-frame-load .icon").removeClass("fa-icon-eye-open");$(".galaxy-frame-background").hide();$(".galaxy-frame-menu").hide()}else{this.visible=true;$(".galaxy-frame").fadeIn("fast");$(".galaxy-frame-load .icon").addClass("fa-icon-eye-open");$(".galaxy-frame-load .icon").removeClass("fa-icon-eye-close");$(this.galaxy_frame_shadow.id).hide();$(".galaxy-frame-background").show();this.menu_refresh()}},panel_active_disable:function(){if(this.active){this.active=false;$(".galaxy-frame-active .icon").removeClass("f-toggle");if(this.visible){this.panel_show_hide()}}else{this.active=true;$(".galaxy-frame-active .icon").addClass("f-toggle")}},frame_new:function(d){if(!this.active){if(d.location=="center"){var c=$(window.parent.document).find("iframe#galaxy_main");c.attr("src",d.content)}else{window.location=d.content}return}if(this.frame_counter>this.options.frame_max){alert("You have reached the maximum number of allowed frames ("+this.options.frame_max+").");return}var e="#galaxy-frame-"+(this.frame_counter_id++);if($(e).length!==0){alert("This frame already exists. This page might contain multiple frame managers.");return}this.top=this.options.top_min;$(this.el).append(this.frame_template(e.substring(1),d.title,d.type,d.content));var f={id:e,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};d.width=this.to_pixel_coord("width",this.options.frame.cols);d.height=this.to_pixel_coord("height",this.options.frame.rows);this.frame_list[e]=f;this.frame_counter++;this.frame_resize(f,{width:d.width,height:d.height});this.frame_insert(f,{top:0,left:0},true);if(!this.visible){this.panel_show_hide()}},frame_insert:function(j,c,e){var d=[];if(j){j.grid_location=null;d.push([j,this.location_rank(c)])}var g=null;for(g in this.frame_list){var h=this.frame_list[g];if(h.grid_location!==null&&!h.grid_lock){h.grid_location=null;d.push([h,h.grid_rank])}}d.sort(function(k,f){var m=k[1];var l=f[1];return m<l?-1:(m>l?1:0)});for(g=0;g<d.length;g++){this.frame_place(d[g][0],e)}this.top_max=0;for(var g in this.frame_list){var j=this.frame_list[g];if(j.grid_location!==null){this.top_max=Math.max(this.top_max,j.grid_location.top+j.grid_location.height)}}this.top_max=$(window).height()-this.top_max*this.options.cell-2*this.options.margin;this.top_max=Math.min(this.top_max,this.options.top_min);this.menu_refresh()},frame_place:function(k,d){k.grid_location=null;var h=this.to_grid(this.frame_screen(k));var c=false;for(var f=0;f<this.options.rows;f++){for(var e=0;e<Math.max(1,this.cols-h.width);e++){h.top=f;h.left=e;if(!this.is_collision(h)){c=true;break}}if(c){break}}if(c){this.frame_grid(k,h,d)}else{console.log("Grid dimensions exceeded.")}},frame_focus:function(e,c){var d=parseInt(b.get_attribute("galaxy-frame","z-index"))+(c?1:0);$(e.id).css("z-index",d)},frame_offset:function(f,e,d){f.screen_location.left=e.left;f.screen_location.top=e.top;if(d){this.frame_focus(f,true);var c=this;$(f.id).animate({top:e.top,left:e.left},"fast",function(){c.frame_focus(f,false)})}else{$(f.id).css({top:e.top,left:e.left})}},frame_resize:function(d,c){$(d.id).css({width:c.width,height:c.height});d.screen_location.width=c.width;d.screen_location.height=c.height},frame_grid:function(e,c,d){e.grid_location=c;this.frame_offset(e,this.to_pixel(c),d);e.grid_rank=this.location_rank(c)},frame_screen:function(d){var c=d.screen_location;return{top:c.top,left:c.left,width:c.width,height:c.height}},frame_template:function(f,e,c,d){if(!e){e=""}if(c=="url"){d='<iframe scrolling="auto" class="f-iframe" src="'+d+'"></iframe>'}return'<div id="'+f+'" class="galaxy-frame f-corner"><div class="f-header f-corner"><span class="f-title">'+e+'</span><span class="f-icon f-pin fa-icon-pushpin"></span><span class="f-icon f-close fa-icon-trash"></span></div><div class="f-content f-corner">'+d+'<div class="f-cover"></div></div><span class="f-resize f-icon f-corner fa-icon-resize-full"></span></div>'},frame_template_shadow:function(c){return'<div id="'+c+'" class="galaxy-frame-shadow f-corner"></div>'},frame_template_background:function(){return'<div class="galaxy-frame-background"></div>'},frame_template_header:function(){return'<div class="galaxy-frame-load f-corner"><div class="number f-corner">0</div><div class="icon fa-icon-2x"></div></div><div class="galaxy-frame-active f-corner" style="position: absolute; top: 8px;"><div class="icon fa-icon-2x fa-icon-th"></div></div>'},frame_template_menu:function(){return'<div class="galaxy-frame-scroll-up galaxy-frame-menu fa-icon-chevron-up fa-icon-2x"></div><div class="galaxy-frame-scroll-down galaxy-frame-menu fa-icon-chevron-down fa-icon-2x"></div>'}});return{GalaxyFrameManager:a}});
\ No newline at end of file
+define(["utils/galaxy.css","libs/backbone/backbone-relational"],function(b){var a=Backbone.View.extend({el:"#everything",el_header:"#masthead",options:{frame:{cols:6,rows:3},rows:1000,cell:130,margin:5,scroll:5,top_min:40,frame_max:10},cols:0,top:0,top_max:0,frame_counter:0,frame_counter_id:0,frame_list:[],galaxy_frame_shadow:null,visible:false,active:false,initialize:function(d){b.load_file("static/style/galaxy.frame.css");if(d){this.options=_.defaults(d,this.options)}this.top=this.top_max=this.options.top_min;$(this.el).append(this.frame_template_background());$(this.el).append(this.frame_template_menu());$(this.el_header).append(this.frame_template_header());var e="#galaxy-frame-shadow";$(this.el).append(this.frame_template_shadow(e.substring(1)));this.galaxy_frame_shadow={id:e,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};this.frame_resize(this.galaxy_frame_shadow,{width:0,height:0});this.frame_list[e]=this.galaxy_frame_shadow;this.panel_refresh();this.event_initialize();$(".galaxy-frame-active").tooltip({title:"Enable/Disable Scratchbook"});$(".galaxy-frame-load").tooltip({title:"Show/Hide Scratchbook"});var c=this;$(window).resize(function(){c.panel_refresh()});window.onbeforeunload=function(){if(c.frame_counter>0){return"You opened "+c.frame_counter+" frame(s) which will be lost."}}},is_mobile:function(){return navigator.userAgent.match(/mobile|(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)},event:{type:null,target:null,xy:null},event_initialize:function(){this.events={mousemove:"event_frame_mouse_move",mouseup:"event_frame_mouse_up",mouseleave:"event_frame_mouse_up",mousewheel:"event_panel_scroll",DOMMouseScroll:"event_panel_scroll","mousedown .galaxy-frame":"event_frame_mouse_down","mousedown .galaxy-frame-active":"event_panel_active","mousedown .galaxy-frame-load":"event_panel_load","mousedown .galaxy-frame-background":"event_panel_load","mousedown .galaxy-frame-scroll-up":"event_panel_scroll_up","mousedown .galaxy-frame-scroll-down":"event_panel_scroll_down","mousedown .f-close":"event_frame_close","mousedown .f-pin":"event_frame_lock"};this.delegateEvents(this.events)},event_frame_mouse_down:function(c){if(this.event.type!==null){return}if($(c.target).hasClass("f-header")||$(c.target).hasClass("f-title")){this.event.type="drag"}if($(c.target).hasClass("f-resize")){this.event.type="resize"}if(this.event.type===null){return}c.preventDefault();this.event.target=this.event_get_frame(c.target);if(this.event.target.grid_lock){this.event.type=null;return}this.event.xy={x:c.originalEvent.pageX,y:c.originalEvent.pageY};this.frame_drag_start(this.event.target)},event_frame_mouse_move:function(i){if(this.event.type!="drag"&&this.event.type!="resize"){return}var g={x:i.originalEvent.pageX,y:i.originalEvent.pageY};var d={x:g.x-this.event.xy.x,y:g.y-this.event.xy.y};this.event.xy=g;var h=this.frame_screen(this.event.target);if(this.event.type=="resize"){h.width+=d.x;h.height+=d.y;var f=this.options.cell-this.options.margin-1;h.width=Math.max(h.width,f);h.height=Math.max(h.height,f);this.frame_resize(this.event.target,h);h.width=this.to_grid_coord("width",h.width)+1;h.height=this.to_grid_coord("height",h.height)+1;h.width=this.to_pixel_coord("width",h.width);h.height=this.to_pixel_coord("height",h.height);this.frame_resize(this.galaxy_frame_shadow,h);this.frame_insert(this.galaxy_frame_shadow,{top:this.to_grid_coord("top",h.top),left:this.to_grid_coord("left",h.left)})}if(this.event.type=="drag"){h.left+=d.x;h.top+=d.y;this.frame_offset(this.event.target,h);var c={top:this.to_grid_coord("top",h.top),left:this.to_grid_coord("left",h.left)};if(c.left!==0){c.left++}this.frame_insert(this.galaxy_frame_shadow,c)}},event_frame_mouse_up:function(c){if(this.event.type!="drag"&&this.event.type!="resize"){return}this.frame_drag_stop(this.event.target);this.event.type=null},event_frame_close:function(d){if(this.event.type!==null){return}d.preventDefault();var f=this.event_get_frame(d.target);var c=this;$(f.id).fadeOut("fast",function(){$(f.id).remove();delete c.frame_list[f.id];c.frame_counter--;c.panel_refresh(true);c.panel_animation_complete();if(c.visible&&c.frame_counter==0){c.panel_show_hide()}})},event_frame_lock:function(c){if(this.event.type!==null){return}c.preventDefault();var d=this.event_get_frame(c.target);if(d.grid_lock){d.grid_lock=false;$(d.id).find(".f-pin").removeClass("f-toggle");$(d.id).find(".f-header").removeClass("f-not-allowed");$(d.id).find(".f-title").removeClass("f-not-allowed");$(d.id).find(".f-resize").show();$(d.id).find(".f-close").show()}else{d.grid_lock=true;$(d.id).find(".f-pin").addClass("f-toggle");$(d.id).find(".f-header").addClass("f-not-allowed");$(d.id).find(".f-title").addClass("f-not-allowed");$(d.id).find(".f-resize").hide();$(d.id).find(".f-close").hide()}},event_panel_load:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_show_hide()},event_panel_active:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_active_disable()},event_panel_scroll:function(c){if(this.event.type!==null||!this.visible){return}c.preventDefault();var d=c.originalEvent.detail?c.originalEvent.detail:c.originalEvent.wheelDelta/-3;this.panel_scroll(d)},event_panel_scroll_up:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_scroll(-this.options.scroll)},event_panel_scroll_down:function(c){if(this.event.type!==null){return}c.preventDefault();this.panel_scroll(this.options.scroll)},event_get_frame:function(c){return this.frame_list["#"+$(c).closest(".galaxy-frame").attr("id")]},frame_drag_start:function(d){this.frame_focus(d,true);var c=this.frame_screen(d);this.frame_resize(this.galaxy_frame_shadow,c);this.frame_grid(this.galaxy_frame_shadow,d.grid_location);d.grid_location=null;$(this.galaxy_frame_shadow.id).show();$(".f-cover").show()},frame_drag_stop:function(d){this.frame_focus(d,false);var c=this.frame_screen(this.galaxy_frame_shadow);this.frame_resize(d,c);this.frame_grid(d,this.galaxy_frame_shadow.grid_location,true);this.galaxy_frame_shadow.grid_location=null;$(this.galaxy_frame_shadow.id).hide();$(".f-cover").hide();this.panel_animation_complete()},to_grid_coord:function(e,d){var c=(e=="width"||e=="height")?1:-1;if(e=="top"){d-=this.top}return parseInt((d+c*this.options.margin)/this.options.cell,10)},to_pixel_coord:function(e,f){var c=(e=="width"||e=="height")?1:-1;var d=(f*this.options.cell)-c*this.options.margin;if(e=="top"){d+=this.top}return d},to_grid:function(c){return{top:this.to_grid_coord("top",c.top),left:this.to_grid_coord("left",c.left),width:this.to_grid_coord("width",c.width),height:this.to_grid_coord("height",c.height)}},to_pixel:function(c){return{top:this.to_pixel_coord("top",c.top),left:this.to_pixel_coord("left",c.left),width:this.to_pixel_coord("width",c.width),height:this.to_pixel_coord("height",c.height)}},is_collision:function(e){function c(h,g){return !(h.left>g.left+g.width-1||h.left+h.width-1<g.left||h.top>g.top+g.height-1||h.top+h.height-1<g.top)}for(var d in this.frame_list){var f=this.frame_list[d];if(f.grid_location===null){continue}if(c(e,f.grid_location)){return true}}return false},location_rank:function(c){return(c.top*this.cols)+c.left},menu_refresh:function(){$(".galaxy-frame-load .number").text(this.frame_counter);if(this.frame_counter==0){$(".galaxy-frame-load").hide()}else{$(".galaxy-frame-load").show()}if(this.top==this.options.top_min){$(".galaxy-frame-scroll-up").hide()}else{$(".galaxy-frame-scroll-up").show()}if(this.top==this.top_max){$(".galaxy-frame-scroll-down").hide()}else{$(".galaxy-frame-scroll-down").show()}},panel_animation_complete:function(){var c=this;$(".galaxy-frame").promise().done(function(){c.panel_scroll(0,true)})},panel_refresh:function(c){this.cols=parseInt($(window).width()/this.options.cell,10)+1;this.frame_insert(null,null,c)},panel_scroll:function(h,c){var e=this.top-this.options.scroll*h;e=Math.max(e,this.top_max);e=Math.min(e,this.options.top_min);if(this.top!=e){for(var d in this.frame_list){var g=this.frame_list[d];if(g.grid_location!==null){var f={top:g.screen_location.top-(this.top-e),left:g.screen_location.left};this.frame_offset(g,f,c)}}this.top=e}this.menu_refresh()},panel_show_hide:function(){if(this.visible){this.visible=false;$(".galaxy-frame").fadeOut("fast");$(".galaxy-frame-load .icon").addClass("fa-icon-eye-close");$(".galaxy-frame-load .icon").removeClass("fa-icon-eye-open");$(".galaxy-frame-background").hide();$(".galaxy-frame-menu").hide()}else{this.visible=true;$(".galaxy-frame").fadeIn("fast");$(".galaxy-frame-load .icon").addClass("fa-icon-eye-open");$(".galaxy-frame-load .icon").removeClass("fa-icon-eye-close");$(this.galaxy_frame_shadow.id).hide();$(".galaxy-frame-background").show();this.menu_refresh()}},panel_active_disable:function(){if(this.active){this.active=false;$(".galaxy-frame-active .icon").removeClass("f-toggle");if(this.visible){this.panel_show_hide()}}else{this.active=true;$(".galaxy-frame-active .icon").addClass("f-toggle")}},frame_new:function(d){if(!this.active){if(d.location=="center"){var c=$(window.parent.document).find("iframe#galaxy_main");c.attr("src",d.content)}else{window.location=d.content}return}if(this.frame_counter>this.options.frame_max){alert("You have reached the maximum number of allowed frames ("+this.options.frame_max+").");return}var e="#galaxy-frame-"+(this.frame_counter_id++);if($(e).length!==0){alert("This frame already exists. This page might contain multiple frame managers.");return}this.top=this.options.top_min;$(this.el).append(this.frame_template(e.substring(1),d.title,d.type,d.content));var f={id:e,screen_location:{},grid_location:{},grid_rank:null,grid_lock:false};d.width=this.to_pixel_coord("width",this.options.frame.cols);d.height=this.to_pixel_coord("height",this.options.frame.rows);this.frame_list[e]=f;this.frame_counter++;this.frame_resize(f,{width:d.width,height:d.height});this.frame_insert(f,{top:0,left:0},true);if(!this.visible){this.panel_show_hide()}},frame_insert:function(j,c,e){var d=[];if(j){j.grid_location=null;d.push([j,this.location_rank(c)])}var g=null;for(g in this.frame_list){var h=this.frame_list[g];if(h.grid_location!==null&&!h.grid_lock){h.grid_location=null;d.push([h,h.grid_rank])}}d.sort(function(k,f){var m=k[1];var l=f[1];return m<l?-1:(m>l?1:0)});for(g=0;g<d.length;g++){this.frame_place(d[g][0],e)}this.top_max=0;for(var g in this.frame_list){var j=this.frame_list[g];if(j.grid_location!==null){this.top_max=Math.max(this.top_max,j.grid_location.top+j.grid_location.height)}}this.top_max=$(window).height()-this.top_max*this.options.cell-2*this.options.margin;this.top_max=Math.min(this.top_max,this.options.top_min);this.menu_refresh()},frame_place:function(k,d){k.grid_location=null;var h=this.to_grid(this.frame_screen(k));var c=false;for(var f=0;f<this.options.rows;f++){for(var e=0;e<Math.max(1,this.cols-h.width);e++){h.top=f;h.left=e;if(!this.is_collision(h)){c=true;break}}if(c){break}}if(c){this.frame_grid(k,h,d)}else{console.log("Grid dimensions exceeded.")}},frame_focus:function(e,c){var d=parseInt(b.get_attribute("galaxy-frame","z-index"))+(c?1:0);$(e.id).css("z-index",d)},frame_offset:function(f,e,d){f.screen_location.left=e.left;f.screen_location.top=e.top;if(d){this.frame_focus(f,true);var c=this;$(f.id).animate({top:e.top,left:e.left},"fast",function(){c.frame_focus(f,false)})}else{$(f.id).css({top:e.top,left:e.left})}},frame_resize:function(d,c){$(d.id).css({width:c.width,height:c.height});d.screen_location.width=c.width;d.screen_location.height=c.height},frame_grid:function(e,c,d){e.grid_location=c;this.frame_offset(e,this.to_pixel(c),d);e.grid_rank=this.location_rank(c)},frame_screen:function(d){var c=d.screen_location;return{top:c.top,left:c.left,width:c.width,height:c.height}},frame_template:function(f,e,c,d){if(!e){e=""}if(c=="url"){d='<iframe scrolling="auto" class="f-iframe" src="'+d+'"></iframe>'}return'<div id="'+f+'" class="galaxy-frame f-corner"><div class="f-header f-corner"><span class="f-title">'+e+'</span><span class="f-icon f-pin fa-icon-pushpin"></span><span class="f-icon f-close fa-icon-trash"></span></div><div class="f-content f-corner">'+d+'<div class="f-cover"></div></div><span class="f-resize f-icon f-corner fa-icon-resize-full"></span></div>'},frame_template_shadow:function(c){return'<div id="'+c+'" class="galaxy-frame-shadow f-corner"></div>'},frame_template_background:function(){return'<div class="galaxy-frame-background"></div>'},frame_template_header:function(){return'<div class="galaxy-frame-load f-corner"><div class="number f-corner">0</div><div class="icon fa-icon-2x"></div></div><div class="galaxy-frame-active f-corner" style="position: absolute; top: 8px;"><div class="icon fa-icon-2x fa-icon-th"></div></div>'},frame_template_menu:function(){return'<div class="galaxy-frame-scroll-up galaxy-frame-menu fa-icon-chevron-up fa-icon-2x"></div><div class="galaxy-frame-scroll-down galaxy-frame-menu fa-icon-chevron-down fa-icon-2x"></div>'}});return{GalaxyFrameManager:a}});
\ No newline at end of file
diff -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 -r d7ea2536e8e370cd202f735351c37264270ddbaf static/scripts/packed/utils/galaxy.css.js
--- a/static/scripts/packed/utils/galaxy.css.js
+++ b/static/scripts/packed/utils/galaxy.css.js
@@ -1,1 +1,1 @@
-define(["libs/underscore"],function(a){function b(g,d){var e=$('<div class="'+g+'"></div>');e.appendTo(":eq(0)");var f=e.css(d);e.remove();return f}function c(d){if(!$('link[href^="'+d+'"]').length){$('<link href="'+d+'" rel="stylesheet">').appendTo("head")}}return{load_file:c,get_attribute:b}});
\ No newline at end of file
+define(["libs/underscore"],function(a){function b(g,d){var e=$('<div class="'+g+'"></div>');e.appendTo(":eq(0)");var f=e.css(d);e.remove();return f}function c(d){if(!$('link[href^="'+d+'"]').length){$('<link href="'+galaxy_config.root+d+'" rel="stylesheet">').appendTo("head")}}return{load_file:c,get_attribute:b}});
\ No newline at end of file
diff -r 19c4ec5b8fafbf9095b102d4c59c6a59f125a8a1 -r d7ea2536e8e370cd202f735351c37264270ddbaf static/scripts/packed/viz/trackster.js
--- a/static/scripts/packed/viz/trackster.js
+++ b/static/scripts/packed/viz/trackster.js
@@ -1,1 +1,1 @@
-var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.css","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/jquery-ui-combobox","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.load_file("/static/style/jquery.rating.css");a.load_file("/static/style/history.css");a.load_file("/static/style/autocomplete_tagging.css");a.load_file("/static/style/jquery-ui/smoothness/jquery-ui.css");a.load_file("/static/style/library.css");a.load_file("/static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(galaxy_config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(galaxy_config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=galaxy_config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:galaxy_config.root+"api/genomes?chrom_info=True",data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){show_modal("New Visualization",e.template_view_new(f),{Cancel:function(){window.location=galaxy_config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val())}});if(galaxy_config.app.default_dbkey){$("#new-dbkey option[value='"+galaxy_config.app.default_dbkey+"']").attr("selected",true)}$("#new-title").focus();$("select[name='dbkey']").combobox({appendTo:$("#overlay"),size:40});$("#overlay").css("overflow","auto")}})},template_view_new:function(e){var g='<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;"><div class="form-row"><label for="new-title">Browser name:</label><div class="form-row-input"><input type="text" name="title" id="new-title" value="Unnamed"></input></div><div style="clear: both;"></div></div><div class="form-row"><label for="new-dbkey">Reference genome build (dbkey): </label><div class="form-row-input"><select name="dbkey" id="new-dbkey">';for(var f in e){g+='<option value="'+e[f][1]+'">'+e[f][0]+"</option>"}g+='</select></div><div style="clear: both;"></div></div><div class="form-row">Is the build not listed here? <a href="'+galaxy_config.root+'user/dbkeys?use_panels=True">Add a Custom Build</a></div></form>';return g},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},galaxy_config.app.gene_region);this.init_editor();view.editor=true;hide_modal()},init_editor:function(){$("#center .unified-panel-title").text(view.name+" ("+view.dbkey+")");if(galaxy_config.app.add_dataset){$.ajax({url:galaxy_config.root+"api/datasets/"+galaxy_config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
+var ui=null;var view=null;var browser_router=null;require(["utils/galaxy.css","libs/jquery/jstorage","libs/jquery/jquery.event.drag","libs/jquery/jquery.event.hover","libs/jquery/jquery.mousewheel","libs/jquery/jquery-ui","libs/jquery/jquery-ui-combobox","libs/farbtastic","libs/jquery/jquery.form","libs/jquery/jquery.rating","mvc/ui"],function(a){a.load_file("static/style/jquery.rating.css");a.load_file("static/style/history.css");a.load_file("static/style/autocomplete_tagging.css");a.load_file("static/style/jquery-ui/smoothness/jquery-ui.css");a.load_file("static/style/library.css");a.load_file("static/style/trackster.css")});define(["libs/backbone/backbone-relational","viz/visualization","viz/trackster_ui"],function(c,a,b){var d=Backbone.View.extend({initialize:function(){ui=new b.TracksterUI(galaxy_config.root);ui.createButtonMenu();ui.buttonMenu.$el.attr("style","float: right");$("#center .unified-panel-header-inner").append(ui.buttonMenu.$el);$("#right .unified-panel-title").append("Bookmarks");$("#right .unified-panel-icons").append("<a id='add-bookmark-button' class='icon-button menu-button plus-button' href='javascript:void(0);' title='Add bookmark'></a>");$("#right-border").click(function(){view.resize_window()});force_right_panel("hide");if(galaxy_config.app.id){this.view_existing()}else{this.view_new()}},set_up_router:function(e){browser_router=new a.TrackBrowserRouter(e);Backbone.history.start()},view_existing:function(){var e=galaxy_config.app.viz_config;view=ui.create_visualization({container:$("#center .unified-panel-body"),name:e.title,vis_id:e.vis_id,dbkey:e.dbkey},e.viewport,e.tracks,e.bookmarks,true);this.init_editor()},view_new:function(){var e=this;$.ajax({url:galaxy_config.root+"api/genomes?chrom_info=True",data:{},error:function(){alert("Couldn't create new browser.")},success:function(f){show_modal("New Visualization",e.template_view_new(f),{Cancel:function(){window.location=galaxy_config.root+"visualization/list"},Create:function(){e.create_browser($("#new-title").val(),$("#new-dbkey").val())}});if(galaxy_config.app.default_dbkey){$("#new-dbkey option[value='"+galaxy_config.app.default_dbkey+"']").attr("selected",true)}$("#new-title").focus();$("select[name='dbkey']").combobox({appendTo:$("#overlay"),size:40});$("#overlay").css("overflow","auto")}})},template_view_new:function(e){var g='<form id="new-browser-form" action="javascript:void(0);" method="post" onsubmit="return false;"><div class="form-row"><label for="new-title">Browser name:</label><div class="form-row-input"><input type="text" name="title" id="new-title" value="Unnamed"></input></div><div style="clear: both;"></div></div><div class="form-row"><label for="new-dbkey">Reference genome build (dbkey): </label><div class="form-row-input"><select name="dbkey" id="new-dbkey">';for(var f in e){g+='<option value="'+e[f][1]+'">'+e[f][0]+"</option>"}g+='</select></div><div style="clear: both;"></div></div><div class="form-row">Is the build not listed here? <a href="'+galaxy_config.root+'user/dbkeys?use_panels=True">Add a Custom Build</a></div></form>';return g},create_browser:function(f,e){$(document).trigger("convert_to_values");view=ui.create_visualization({container:$("#center .unified-panel-body"),name:f,dbkey:e},galaxy_config.app.gene_region);this.init_editor();view.editor=true;hide_modal()},init_editor:function(){$("#center .unified-panel-title").text(view.name+" ("+view.dbkey+")");if(galaxy_config.app.add_dataset){$.ajax({url:galaxy_config.root+"api/datasets/"+galaxy_config.app.add_dataset,data:{hda_ldda:"hda",data_type:"track_config"},dataType:"json",success:function(e){view.add_drawable(b.object_from_template(e,view,view))}})}$("#add-bookmark-button").click(function(){var f=view.chrom+":"+view.low+"-"+view.high,e="Bookmark description";return ui.add_bookmark(f,e,true)});ui.init_keyboard_nav(view);this.set_up_router({view:view})}});return{GalaxyApp:d}});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0