From ae1d7da3c5b924c66898c022dd0c6b380cae03d9 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 5 Aug 2013 23:50:04 -0500 Subject: [PATCH 1/4] Fix tool.requires_login behvaior broken with dynamic tool box filters (sorry again Dan and thanks for the bug report). --- lib/galaxy/tools/filters/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tools/filters/__init__.py b/lib/galaxy/tools/filters/__init__.py index a99a94d7454..11b62334784 100644 --- a/lib/galaxy/tools/filters/__init__.py +++ b/lib/galaxy/tools/filters/__init__.py @@ -25,8 +25,7 @@ class FilterFactory( object ): """ filters = self.default_filters.copy() - if not trans.user: - filters[ "tool" ].append( _requires_login ) + filters[ "tool" ].append( _handle_requires_login ) if kwds.get( "trackster", False ): filters[ "tool" ].append( _has_trackster_conf ) @@ -59,8 +58,8 @@ def _not_hidden( context, tool ): return not tool.hidden -def _requires_login( context, tool ): - return not tool.require_login +def _handle_requires_login( context, tool ): + return not tool.require_login or context.trans.user def _has_trackster_conf( context, tool ): From 0dd2f9a5e09dd58b0aae183a01722fd77ae6e59b Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 6 Aug 2013 00:01:44 -0500 Subject: [PATCH 2/4] Slight simplification of logic related to implementation of tool.requires_login. --- lib/galaxy/tools/filters/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/galaxy/tools/filters/__init__.py b/lib/galaxy/tools/filters/__init__.py index 11b62334784..13bf9dc6435 100644 --- a/lib/galaxy/tools/filters/__init__.py +++ b/lib/galaxy/tools/filters/__init__.py @@ -12,7 +12,7 @@ class FilterFactory( object ): # Prepopulate dict containing filters that are always checked, # other filters that get checked depending on context (e.g. coming from # trackster or no user found are added in build filters). - self.default_filters = dict( tool=[ _not_hidden ], section=[], label=[] ) + self.default_filters = dict( tool=[ _not_hidden, _handle_requires_login ], section=[], label=[] ) # Add dynamic filters to these default filters. config = toolbox.app.config self.__init_filters( "tool", config.tool_filters ) @@ -25,8 +25,6 @@ class FilterFactory( object ): """ filters = self.default_filters.copy() - filters[ "tool" ].append( _handle_requires_login ) - if kwds.get( "trackster", False ): filters[ "tool" ].append( _has_trackster_conf ) From 1cfcf5bc1ac58c90b43ec82cf826cd37b128d16c Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Tue, 6 Aug 2013 10:59:43 -0400 Subject: [PATCH 3/4] Add requirements tags to tophat wrapper. --- tools/ngs_rna/tophat_wrapper.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ngs_rna/tophat_wrapper.xml b/tools/ngs_rna/tophat_wrapper.xml index 56fdf30e359..a8961fe98a4 100644 --- a/tools/ngs_rna/tophat_wrapper.xml +++ b/tools/ngs_rna/tophat_wrapper.xml @@ -3,6 +3,8 @@ Find splice junctions using RNA-seq data tophat --version + samtools + bowtie tophat From 20196a6e198ece6d74afa6ebd27ab26f4193fa92 Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Tue, 6 Aug 2013 11:01:31 -0400 Subject: [PATCH 4/4] Add tophat2 to main tool conf. --- tool_conf.xml.main | 1 + 1 file changed, 1 insertion(+) diff --git a/tool_conf.xml.main b/tool_conf.xml.main index aaf29cac3bc..cd4d0533a98 100644 --- a/tool_conf.xml.main +++ b/tool_conf.xml.main @@ -326,6 +326,7 @@