1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/c015b82b3944/
changeset: c015b82b3944
user: natefoo
date: 2013-01-10 18:25:27
summary: DRMAA: Don't attempt to stop jobs that have no external ID set.
affected #: 1 file
diff -r caaab03824478384c256fc6b5678bb39dbf8f9f2 -r c015b82b3944f967e2c859d5552c00e3e38a2da0 lib/galaxy/jobs/runners/drmaa.py
--- a/lib/galaxy/jobs/runners/drmaa.py
+++ b/lib/galaxy/jobs/runners/drmaa.py
@@ -400,16 +400,18 @@
def stop_job( self, job ):
"""Attempts to delete a job from the DRM queue"""
try:
+ ext_id = job.get_job_runner_external_id()
+ assert ext_id not in ( None, 'None' ), 'External job id is None'
if self.external_killJob_script is None:
- self.ds.control( job.get_job_runner_external_id(), drmaa.JobControlAction.TERMINATE )
+ self.ds.control( ext_id, drmaa.JobControlAction.TERMINATE )
else:
# FIXME: hardcoded path
- subprocess.Popen( [ '/usr/bin/sudo', '-E', self.external_killJob_script, str( job.get_job_runner_external_id() ), str( self.userid ) ], shell=False )
- log.debug( "(%s/%s) Removed from DRM queue at user's request" % ( job.get_id(), job.get_job_runner_external_id() ) )
+ subprocess.Popen( [ '/usr/bin/sudo', '-E', self.external_killJob_script, str( ext_id ), str( self.userid ) ], shell=False )
+ log.debug( "(%s/%s) Removed from DRM queue at user's request" % ( job.get_id(), ext_id ) )
except drmaa.InvalidJobException:
- log.debug( "(%s/%s) User killed running job, but it was already dead" % ( job.get_id(), job.get_job_runner_external_id() ) )
+ log.debug( "(%s/%s) User killed running job, but it was already dead" % ( job.get_id(), ext_id ) )
except Exception, e:
- log.debug( "(%s/%s) User killed running job, but error encountered removing from DRM queue: %s" % ( job.get_id(), job.get_job_runner_external_id(), e ) )
+ log.debug( "(%s/%s) User killed running job, but error encountered removing from DRM queue: %s" % ( job.get_id(), ext_id, e ) )
def recover( self, job, job_wrapper ):
"""Recovers jobs stuck in the queued/running state when Galaxy started"""
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a7049f42a9d9/
changeset: a7049f42a9d9
user: jgoecks
date: 2013-01-09 19:36:33
summary: Add parameter to Tophat2 so that output BAM is ordered using reference contigs ordering rather than sorted lexicographically.
affected #: 1 file
diff -r 184c5e409425da36556de7edda910a7ffe6bc9d0 -r a7049f42a9d9b4bef6804dee53a2bc8bcc1a2916 tools/ngs_rna/tophat2_wrapper.py
--- a/tools/ngs_rna/tophat2_wrapper.py
+++ b/tools/ngs_rna/tophat2_wrapper.py
@@ -134,7 +134,7 @@
index_path = options.index_path
# Build tophat command.
- cmd = 'tophat2 %s %s %s'
+ cmd = 'tophat2 --keep-fasta-order %s %s %s'
reads = options.input1
if options.input2:
reads += ' ' + options.input2
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b97bdb63115c/
changeset: b97bdb63115c
user: jgoecks
date: 2013-01-09 17:27:53
summary: Create and use function for checking a slug's validity.
affected #: 3 files
diff -r 757217fbae1981bc66d05076ab93dcbc92dca072 -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -28,8 +28,12 @@
# States for passing messages
SUCCESS, INFO, WARNING, ERROR = "done", "info", "warning", "error"
-# RE that tests for valid slug.
-VALID_SLUG_RE = re.compile( "^[a-z0-9\-]+$" )
+def _is_valid_slug( slug ):
+ """ Returns true if slug is valid. """
+
+ VALID_SLUG_RE = re.compile( "^[a-z0-9\-]+$" )
+ return VALID_SLUG_RE.match( slug )
+
class BaseController( object ):
"""
@@ -186,6 +190,7 @@
self.type_extension = type_extension
self.mimetype = mimetype
self.display_in_upload = display_in_upload
+
#
# -- Mixins for working with Galaxy objects. --
#
@@ -210,6 +215,7 @@
raise ItemAccessibilityException( "%s is not accessible to the current user" % item.__class__.__name__, type='error' )
return item
+
class UsesHistoryDatasetAssociationMixin:
""" Mixin for controllers that use HistoryDatasetAssociation objects. """
@@ -552,7 +558,7 @@
title_err = slug_err = ""
if not title:
title_err = "visualization name is required"
- elif slug and not VALID_SLUG_RE.match( slug ):
+ elif slug and not _is_valid_slug( slug ):
slug_err = "visualization identifier must consist of only lowercase letters, numbers, and the '-' character"
elif slug and trans.sa_session.query( trans.model.Visualization ).filter_by( user=user, slug=slug, deleted=False ).first():
slug_err = "visualization identifier must be unique"
@@ -1465,6 +1471,10 @@
""" Mixin for a controller that manages an item that can be shared. """
# -- Implemented methods. --
+
+ def _is_valid_slug( self, slug ):
+ """ Returns true if slug is valid. """
+ return _is_valid_slug( slug )
@web.expose
@web.require_login( "share Galaxy items" )
diff -r 757217fbae1981bc66d05076ab93dcbc92dca072 -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 lib/galaxy/webapps/galaxy/controllers/page.py
--- a/lib/galaxy/webapps/galaxy/controllers/page.py
+++ b/lib/galaxy/webapps/galaxy/controllers/page.py
@@ -2,7 +2,7 @@
from galaxy import model, web
from galaxy.web import error, url_for
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
-from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesHistoryMixin, UsesStoredWorkflowMixin, UsesVisualizationMixin, VALID_SLUG_RE
+from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesHistoryMixin, UsesStoredWorkflowMixin, UsesVisualizationMixin
from galaxy.web.framework.helpers import time_ago, grids
from galaxy import util
from galaxy.util.sanitize_html import sanitize_html, _BaseHTMLProcessor
@@ -342,7 +342,7 @@
page_title_err = "Page name is required"
elif not page_slug:
page_slug_err = "Page id is required"
- elif not VALID_SLUG_RE.match( page_slug ):
+ elif not self._is_valid_slug( page_slug ):
page_slug_err = "Page identifier must consist of only lowercase letters, numbers, and the '-' character"
elif trans.sa_session.query( model.Page ).filter_by( user=user, slug=page_slug, deleted=False ).first():
page_slug_err = "Page id must be unique"
@@ -398,7 +398,7 @@
page_title_err = "Page name is required"
elif not page_slug:
page_slug_err = "Page id is required"
- elif not VALID_SLUG_RE.match( page_slug ):
+ elif not self._is_valid_slug( page_slug ):
page_slug_err = "Page identifier must consist of only lowercase letters, numbers, and the '-' character"
elif page_slug != page.slug and trans.sa_session.query( model.Page ).filter_by( user=user, slug=page_slug, deleted=False ).first():
page_slug_err = "Page id must be unique"
diff -r 757217fbae1981bc66d05076ab93dcbc92dca072 -r b97bdb63115cf50562e423ac165cffcdd5bb64e1 lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -3,7 +3,7 @@
from sqlalchemy import desc, or_, and_
from galaxy import model, web
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
-from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesVisualizationMixin, VALID_SLUG_RE
+from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesVisualizationMixin
from galaxy.web.framework.helpers import time_ago, grids, iff
from galaxy import util
from galaxy.util.json import from_json_string
@@ -636,7 +636,7 @@
visualization_title_err = "Visualization name is required"
elif not visualization_slug:
visualization_slug_err = "Visualization id is required"
- elif not VALID_SLUG_RE.match( visualization_slug ):
+ elif not self._is_valid_slug( visualization_slug ):
visualization_slug_err = "Visualization identifier must consist of only lowercase letters, numbers, and the '-' character"
elif visualization_slug != visualization.slug and trans.sa_session.query( model.Visualization ).filter_by( user=visualization.user, slug=visualization_slug, deleted=False ).first():
visualization_slug_err = "Visualization id must be unique"
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/757217fbae19/
changeset: 757217fbae19
user: jgoecks
date: 2013-01-09 17:15:11
summary: Fix bug that prevented datasources from being returned correctly.
affected #: 1 file
diff -r 6ef9b038e329b6ee4e71ef1d1b1a22b9b2000ca1 -r 757217fbae1981bc66d05076ab93dcbc92dca072 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1335,7 +1335,9 @@
# Loop through sources until viable one is found.
for source in source_list:
msg = self.convert_dataset( trans, source )
- if msg == self.conversion_messages.PENDING:
+ # No message or PENDING means that source is viable. No
+ # message indicates conversion was done and is successful.
+ if not msg or msg == self.conversion_messages.PENDING:
data_source = source
break
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/857a60e69c7a/
changeset: 857a60e69c7a
user: greg
date: 2013-01-09 15:20:58
summary: Fix for correctly positioning tool shed repository tools in the proper tool panel location when the repository is being installed or reinstalled.
affected #: 1 file
diff -r be29d1334c08ec3e32290feab9a6da7bda9862ec -r 857a60e69c7aee92f67f37311a40a825b40a6481 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -184,17 +184,17 @@
instance and when uninstalled repositories are being reinstalled.
"""
message = ''
- # The following list will be maintained within this method to contain all created or updated tool shed repositories, including repository
- # dependencies that may not be installed.
+ # The following list will be maintained within this method to contain all created or updated tool shed repositories, including repository dependencies
+ # that may not be installed.
all_created_or_updated_tool_shed_repositories = []
- # There will be a one-to-one mapping between items in created_or_updated_tool_shed_repositories and tool_panel_section_keys. The following
- # list will filter out repository dependencies that are not to be installed.
+ # There will be a one-to-one mapping between items in 3 lists: created_or_updated_tool_shed_repositories, tool_panel_section_keys and filtered_repo_info_dicts.
+ # The 3 lists will filter out repository dependencies that are not to be installed.
created_or_updated_tool_shed_repositories = []
tool_panel_section_keys = []
- # Repositories will be filtered (e.g., if already installed, etc), so filter the associated repo_info_dicts accordingly.
+ # Repositories will be filtered (e.g., if already installed, if elected to not be installed, etc), so filter the associated repo_info_dicts accordingly.
filtered_repo_info_dicts = []
- # Discover all repository dependencies and retrieve information for installing them. Even if the user elected to not install repository dependencies,
- # we have to make sure all repository dependency objects exist so that the appropriate repository dependency relationships can be built.
+ # Discover all repository dependencies and retrieve information for installing them. Even if the user elected to not install repository dependencies we have
+ # to make sure all repository dependency objects exist so that the appropriate repository dependency relationships can be built.
all_repo_info_dicts = get_required_repo_info_dicts( tool_shed_url, repo_info_dicts )
if not all_repo_info_dicts:
# No repository dependencies were discovered so process the received repositories.
@@ -215,9 +215,12 @@
tool_panel_section=tool_panel_section,
new_tool_panel_section=new_tool_panel_section )
if reinstalling or install_repository_dependencies:
+ # If the user elected to install repository dependencies, all items in the all_repo_info_dicts list will be processed. However, if
+ # repository dependencies are not to be installed, only those items contained in the received repo_info_dicts list will be processed.
if is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ) or install_repository_dependencies:
if installed_tool_shed_repository.status in [ trans.model.ToolShedRepository.installation_status.ERROR,
trans.model.ToolShedRepository.installation_status.UNINSTALLED ]:
+ # The current tool shed repository is not currently installed, so we can update it's record in the database.
can_update = True
name = installed_tool_shed_repository.name
description = installed_tool_shed_repository.description
@@ -225,13 +228,19 @@
metadata_dict = installed_tool_shed_repository.metadata
dist_to_shed = installed_tool_shed_repository.dist_to_shed
else:
- # There is a repository already installed which is a dependency of the repository being reinstalled.
+ # The tool shed repository currently being processed is already installed or is in the process of being installed, so it's record
+ # in the database cannot be updated.
can_update = False
else:
+ # This block will be reached only if reinstalling is True, install_repository_dependencies is False and is_in_repo_info_dicts is False.
+ # The tool shed repository currently being processed must be a repository dependency that the user elected to not install, so it's
+ # record in the database cannot be updated.
can_update = False
else:
+ # This block will be reached only if reinstalling is False and install_repository_dependencies is False. This implies that the tool shed
+ # repository currently being processed has already been installed.
if len( all_repo_info_dicts ) == 1:
- # An attempt is being made to install a tool shed repository into a Galaxy instance when the same repository was previously installed.
+ # If only a single repository is being installed, return an informative message to the user.
message += "Revision <b>%s</b> of tool shed repository <b>%s</b> owned by <b>%s</b> " % ( changeset_revision, name, repository_owner )
if installed_changeset_revision != changeset_revision:
message += "was previously installed using changeset revision <b>%s</b>. " % installed_changeset_revision
@@ -247,26 +256,24 @@
created_or_updated_tool_shed_repositories.append( installed_tool_shed_repository )
tool_panel_section_keys.append( tool_panel_section_key )
return created_or_updated_tool_shed_repositories, tool_panel_section_keys, all_repo_info_dicts, filtered_repo_info_dicts, message
- elif is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ):
- can_update = True
else:
+ # We're in the process of installing multiple tool shed repositories into Galaxy. Since the repository currently being processed
+ # has already been installed, skip it and process the next repository in the list.
can_update = False
else:
- # A tool shed repository is being installed into a Galaxy instance for the first time. We may have the case where a repository
- # is being reinstalled where because the repository being newly installed here may be a dependency of the repository being reinstalled.
+ # A tool shed repository is being installed into a Galaxy instance for the first time, or we're attempting to install it or reinstall it resulted
+ # in an error. In the latter case, the repository record in the database has no metadata and it's status has been set to 'New'. In either case,
+ # the repository's database record may be updated.
can_update = True
installed_changeset_revision = changeset_revision
metadata_dict = {}
dist_to_shed = False
if can_update:
+ # The database record for the tool shed repository currently being processed can be updated.
if reinstalling or install_repository_dependencies:
# Get the repository metadata to see where it was previously located in the tool panel.
- installed_tool_shed_repository = suc.get_repository_for_dependency_relationship( app=trans.app,
- tool_shed=tool_shed_url,
- name=name,
- owner=repository_owner,
- changeset_revision=changeset_revision )
if installed_tool_shed_repository:
+ # The tool shed repository status is one of 'New', 'Uninstalled', or 'Error'.
tool_section, new_tool_panel_section, tool_panel_section_key = \
handle_tool_panel_selection( trans=trans,
metadata=installed_tool_shed_repository.metadata,
@@ -274,6 +281,8 @@
tool_panel_section=tool_panel_section,
new_tool_panel_section=new_tool_panel_section )
else:
+ # We're installing a new tool shed repository that does not yet have a database record. This repository is a repository dependency
+ # of a different repository being installed.
if new_tool_panel_section:
section_id = new_tool_panel_section.lower().replace( ' ', '_' )
tool_panel_section_key = 'section_%s' % str( section_id )
@@ -282,6 +291,7 @@
else:
tool_panel_section_key = None
else:
+ # We're installing a new tool shed repository that does not yet have a database record.
if new_tool_panel_section:
section_id = new_tool_panel_section.lower().replace( ' ', '_' )
tool_panel_section_key = 'section_%s' % str( section_id )
@@ -300,9 +310,11 @@
current_changeset_revision=changeset_revision,
owner=repository_owner,
dist_to_shed=False )
+ # Add the processed tool shed repository to the list of all processed repositories maintained within this method.
all_created_or_updated_tool_shed_repositories.append( tool_shed_repository )
- # Only append the tool_shed_repository to the list of created_or_updated_tool_shed_repositories if it is supposed to be installed.
+ # Only append the tool shed repository to the list of created_or_updated_tool_shed_repositories if it is supposed to be installed.
if install_repository_dependencies or is_in_repo_info_dicts( repo_info_dict, repo_info_dicts ):
+ # Keep the one-to-one mapping between items in 3 lists.
created_or_updated_tool_shed_repositories.append( tool_shed_repository )
tool_panel_section_keys.append( tool_panel_section_key )
filtered_repo_info_dicts.append( encoding_util.tool_shed_encode( repo_info_dict ) )
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.