name: inverse layout: true class: center, middle, inverse
---
# Advanced customisation of a Galaxy instance
Björn Grüning
Helena Rasche
Martin Čech
last_modification
Updated:
purl
PURL
:
gxy.io/GTN:S00000
text-document
Plain-text slides
|
Tip:
press
P
to view the presenter notes |
arrow-keys
Use arrow keys to move between slides
??? Presenter notes contain extra information which might be useful if you intend to use these slides for teaching. Press `P` again to switch presenter notes off Press `C` to create a new window where the same presentation will be displayed. This window is linked to the main window. Changing slides on one will cause the slide to change on the other. Useful when presenting. --- ### Setup We are going to use a prebuilt virtual machine image for this session. From the given USB stick, please: * Copy and install VirtualBox (or [download](https://www.virtualbox.org/wiki/Downloads)) if you do not have it already. * Copy the Planemo machine image - file `latest.ova` or [download](https://images.galaxyproject.org/planemo/). --- ## Galaxy's frontend JavaScript sources and CSS sources are in the `$GALAXY_ROOT/client` folder. Whenever you make changes there, you will need to re-build Galaxy's frontend with: ```console $ cd $GALAXY_ROOT $ make client ``` This requires [Node](https://nodejs.org/). --- ### Translation and localisation 1/2 The language for labels used in the JS source code is English, but can be wrapped in `l()` which makes it translatable. ```javascript _l( 'Help' ) ``` -- * There is a script [client/galaxy/scripts/nls/locale.js](https://github.com/galaxyproject/galaxy/blob/dev/client/galaxy/scripts/nls/locale.js) that defines all translatable labels. By default without a translation. ```javascript "Analyze Data" : false, ``` -- * There is a folder [client/galaxy/scripts/nls/](https://github.com/galaxyproject/galaxy/tree/dev/client/galaxy/scripts/nls) that contains all available localisations. ``` "Analyze Data" : "Analyse de données", ``` --- ### Translation and localisation 2/2 When a user's browser locale or language is set to a known translation, it will be used instead of the default. If a translation is not available for a string, it will appear in English. --- ### How to modify the menu Open the [client/galaxy/scripts/layout/menu.js](https://github.com/galaxyproject/galaxy/blob/dev/client/galaxy/scripts/layout/menu.js) ```javascript var helpTab = { id : 'help', title : _l('Help'), tooltip : _l('Support, contact, and community'), menu : [{ title : _l('Support'), url : options.support_url, target : '_blank' },{ title : _l('Search'), url : options.search_url, target : '_blank' ``` --- ## Configuration tweaks Plenty of customisation can be achieved using settings in the main configuration file [galaxy.yml](https://github.com/galaxyproject/galaxy/blob/dev/config/galaxy.yml.sample) --- ### Tool Panel configuration * How the tool panel looks like is decided in a file called `integrated_tool_panel.xml`. * By default it resides in Galaxy's root folder. * If missing it is generated from all other tool config files during startup. * Modify it if you want to reorder tools or move sections. --- ### Tool panel labels You can add `<tool labels="updated" />` to achieve: ![tool panel labels](../../images/toolpanel_labels.png) --- ### Tool Panel search configuration 1/2 The tool panel search uses a pre-built index that is compiled during Galaxy boot. You can tweak tool panel search by configuring boosts in `galaxy.yml`. ```ini tool_name_boost: 9 tool_section_boost: 3 tool_description_boost: 2 tool_label_boost: 1 tool_stub_boost: 5 tool_help_boost: 0.5 ``` You can also manipulate the number of tools returned for any query by changing the `tool_search_limit`. This will display more or fewer tools for any given query. --- ### Tool Panel search configuration 2/2 ```ini # Enable/ disable Ngram-search for tools. It makes tool # search results tolerant for spelling mistakes in the query # by dividing the query into multiple ngrams and search for # each ngram tool_enable_ngram_search: true # Set minimum and maximum sizes of ngrams tool_ngram_minsize: 3 tool_ngram_maxsize: 5 ``` --- ### Log level configuration ```ini # Verbosity of console log messages. log_level: DEBUG ``` These are [python logging levels](https://docs.python.org/2/library/logging.html#logging-levels). ![log levels](../../images/log_levels.png) --- ### Help menu ```ini # The URL linked by the "Wiki" link in the "Help" menu. wiki_url: https://galaxyproject.org/ # The URL linked by the "Support" link in the "Help" menu. support_url: https://galaxyproject.org/support # The URL linked by the "How to Cite Galaxy" link in the "Help" menu. #citation_url: https://galaxyproject.org/citing-galaxy # The URL linked by the "Search" link in the "Help" menu. #search_url: https://galaxyproject.org/search/ # The URL linked by the "Mailing Lists" link in the "Help" menu. #mailing_lists_url: https://galaxyproject.org/mailing-lists # The URL linked by the "Videos" link in the "Help" menu. #screencasts_url: https://vimeo.com/galaxyproject # The URL linked by the "Terms and Conditions" link in the "Help" menu, as well # as on the user registration and login forms and in the activation emails. #terms_url: None ``` --- ### Brand and welcome ```ini # Append "/{brand}" to the "Galaxy" text in the masthead. brand: GenOuest ``` ![brand](../../images/brand.png) ```ini # The URL linked by the "Galaxy/brand" text. logo_url: / # The URL of the page to display in Galaxy's middle pane when loaded. This can # be an absolute or relative URL. welcome_url: /static/welcome.html ``` --- ### Email configuration ```ini error_email_to: marten+error@bx.psu.edu activation_email: marten+activation@bx.psu.edu blacklist_file: config/disposable_email_blacklist.conf registration_warning_message: Please only register one account user_activation_on: False activation_grace_period: 6 ``` --- ### Galaxy Tours Have their own [tutorial](/training-material/topics/dev//tutorials/interactive-tours/slides.html#1). --- ### Galaxy Webhooks Have their own [slides](/training-material/topics/dev//tutorials/webhooks/slides.html#1) and [tutorial](/training-material/topics/dev//tutorials/webhooks/tutorial.html). And also a [documentation](https://docs.galaxyproject.org/en/master/admin/special_topics/webhooks.html) --- ### Adjusting styles We use SCSS to build our CSS. Among other features it allows defining [variables](https://github.com/galaxyproject/galaxy/blob/release_19.01/client/galaxy/style/scss/theme/blue.scss). ```diff --- a/client/galaxy/style/scss/theme/blue.scss +++ b/client/galaxy/style/scss/theme/blue.scss @@ -2,7 +2,7 @@ -@base-color-1: #2c3143; +@base-color-1: blue; ``` ![blue base color](../../images/blue_base.png) --- ## Dynamic Welcome Page * Customizing the welcome page is quite easy, just edit `$GALAXY_ROOT/static/welcome.html` -- * Embedding [twitter feeds](https://publish.twitter.com) is popular, e.g. [usegalaxy.org](https://usegalaxy.org) -- * IFrame to embed a blog hosted on the same domain ```html <!-- Header --> <h3>News</h3> <!-- Iframe contents go here --> <div id="test-rss"> </div> <!-- Load JQuery --> <script src="https://fqdn/galaxy/static/scripts/libs/jquery/jquery.js"> </script> <!-- Load contents into div --> <script type="text/javascript"> $('#test-rss').load('https://fqdn/category/dev/ #content'); </script> ``` --- ## Toolbox filtering ``` # -- ToolBox filtering # Modules from lib/galaxy/tools/toolbox/filters/ can be specified in # the following lines. tool_* filters will be applied for all users # and can not be changed by them. user_tool_* filters will be shown # under user preferences and can be toggled on and off at # runtime. Example shown below are not real defaults (no custom # filters are applied by default), but can be enabled by renaming the # examples.py.sample in the filters directory to examples.py. #tool_filters = #tool_label_filters = #tool_section_filters = #user_tool_filters: examples:restrict_upload_to_admins, examples:restrict_encode #user_tool_section_filters: examples:restrict_text #user_tool_label_filters: examples:restrict_upload_to_admins, examples:restrict_encode # The base modules that are searched for modules as described above # can be modified and modules external to Galaxy can be searched by # modifying the following option. #toolbox_filter_base_modules: galaxy.tools.toolbox.filters,galaxy.tools.filters ``` --- ## Quotas Used to control user disk usage. To turn on the use of quotas: In `galaxy.yml`: * `enable_quotas` Enable enforcement of quotas. Quotas can be set from the Admin interface (under Data). * must create quotas in admin interface before any quota will be enforced, otherwise 'unlimited' Amounts: - Examples: "10000MB", "99 gb", "0.2T", "unlimited" - = / + / - Default for user class: - None (No) - Unregistered Users - Registered Users or associated with Groups or Users --- ## Exercise: Creating Quotas * Create quotas for Unregistered (1b) and Registered Users (1mb) * Create a quota that adds 1GB * Create a quota that decreases by 1GB * Create a quota that grants unlimited --- ## Thank You! This material is the result of a collaborative work. Thanks to the [Galaxy Training Network](https://training.galaxyproject.org) and all the contributors!
Author(s)
Björn Grüning
Helena Rasche
Martin Čech
Reviewers
Tutorial Content is licensed under
Creative Commons Attribution 4.0 International License
.