Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] fgenesh toolbox filter #2010

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions templates/galaxy/toolbox/filters/ga_filters.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,6 @@ test_tools = [
'id': 'maxquant_test',
'role': 'maxquant_test',
},
{
'id': 'fgenesh',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_annotate',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_get_mrnas_gc',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_merge',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_split',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_to_genbank',
'role': 'Fgenesh',
},
{
'id': 'fgenesh_get_proteins',
'role': 'Fgenesh',
},
{
'id': 'cellranger',
'role': 'cellranger',
Expand All @@ -56,6 +28,19 @@ def hide_test_tools(context, tool):
return user is not None and user.email in test_tool_users
return True

def hide_fgenesh(context, tool):
"""
make fgenesh* visible to members of Fgenesh group
"""
if tool.id.startswith('fgenesh'):
user = context.trans.user
return user is not None and (
user.email in test_tool_users or 'Fgenesh' in [
r.name for r in user.all_roles() if not r.deleted
]
)
return True

def restrict_alphafold(context, tool):
"""
Only let GA team, alphafold beta users and UoM vet school alphafold users see alphafold
Expand Down