Shed-tools

A tool to automate installation of tool repositories from a Galaxy Tool Shed into an instance of Galaxy.

Shed-tools has three commands: update, test and install.

Update simply updates all the tools in a Galaxy given connection details on the command line.

Test tests the specified tools in the Galaxy Instance.

Install allows installation of tools in multiple ways. Galaxy instance details and the installed tools can be provided in one of three ways:

  1. In the YAML format via dedicated files (a sample can be found here).
  2. On the command line as dedicated script options (see the usage help).
  3. As a single composite parameter to the script. The parameter must be a single, YAML-formatted string with the keys corresponding to the keys available for use in the YAML formatted file (for example: –yaml_tool “{‘owner’: ‘kellrott’, ‘tool_shed_url’: ‘https://testtoolshed.g2.bx.psu.edu’, ‘tool_panel_section_id’: ‘peak_calling’, ‘name’: ‘synapse_interface’}”).

Only one of the methods can be used with each invocation of the script but if more than one are provided are provided, precedence will correspond to order of the items in the list above. When installing tools, Galaxy expects any tool_panel_section_id provided when installing a tool to already exist in the configuration. If the section does not exist, the tool will be installed outside any section. See shed_tool_conf.xml.sample in this directory for a sample of such file. Before running this script to install the tools, make sure to place such file into Galaxy’s configuration directory and set Galaxy configuration option tool_config_file to include it.

Usage

usage: shed-tools [-h] {install,update,test} ...

Sub-commands:

install

This installs tools in Galaxy from the Tool Shed.Use shed-tools install –help for more information

shed-tools install [-h] [-v] [--log_file LOG_FILE] [-g GALAXY] [-u USER]
                   [-p PASSWORD] [-a API_KEY] [-t TOOL_LIST_FILE]
                   [-y TOOL_YAML] [--name NAME] [--owner OWNER]
                   [--revisions [REVISIONS [REVISIONS ...]]]
                   [--toolshed TOOL_SHED_URL] [--install_tool_dependencies]
                   [--skip_install_resolver_dependencies]
                   [--skip_install_repository_dependencies] [--test]
                   [--test_existing] [--test_json TEST_JSON]
                   [--test_user_api_key TEST_USER] [--test_user TEST_USER]
                   [--section TOOL_PANEL_SECTION_ID]
                   [--section_label TOOL_PANEL_SECTION_LABEL] [--latest]
Named Arguments
-t, --toolsfile
 Tools file to use (see tool_list.yaml.sample)
-y, --yaml_tool
 Install tool represented by yaml string
--name The name of the tool to install (only applicable if the tools file is not provided).
--owner The owner of the tool to install (only applicable if the tools file is not provided).
--revisions The revisions of the tool repository that will be installed. All revisions must be specified after this flag by a space.Example: –revisions 0a5c7992b1ac f048033da666(Only applicable if the tools file is not provided).
--toolshed The Tool Shed URL where to install the tool from. This is applicable only if the tool info is provided as an option vs. in the tools file.
--install_tool_dependencies
 

Turn on installation of tool dependencies using classic toolshed packages. Can be overwritten on a per-tool basis in the tools file.

Default: False

--skip_install_resolver_dependencies
 

Skip installing tool dependencies through resolver (e.g. conda). Will be ignored on galaxy releases older than 16.07. Can be overwritten on a per-tool basis in the tools file

Default: True

--skip_install_repository_dependencies
 

Skip installing the repository dependencies.

Default: True

--test

Run tool tests on install tools, requires Galaxy 18.05 or newer.

Default: False

--test_existing
 

If testing tools during install, also run tool tests on repositories already installed (i.e. skipped repositories).

Default: False

--test_json

If testing tools, record tool test output to specified file. This file can be turned into reports with planemo test_reports <output.json>.

Default: “tool_test_output.json”

--test_user_api_key
 If testing tools, a user is needed to execute the tests. This can be different the –api_key which is assumed to be an admin key. If –api_key is a valid user (e.g. it is not a master API key) this does not need to be specified and –api_key will be reused.
--test_user If testing tools, a user is needed to execute the tests. If –api_key is a master api key (i.e. not tied to a real user) and –test_user_api_key isn’t specified, this user email will be used. This user will be created if needed.
--section Galaxy tool panel section ID where the tool will be installed (the section must exist in Galaxy; only applicable if the tools file is not provided).
--section_label
 Galaxy tool panel section label where tool will be installed (if the section does not exist, it will be created; only applicable if the tools file is not provided).
--latest

Will override the revisions in the tools file and always install the latest revision.

Default: False

General options
-v, --verbose

Increase output verbosity.

Default: False

--log_file Where the log file should be stored. Default is a file in your system’s temp folder
Galaxy connection
-g, --galaxy

Target Galaxy instance URL/IP address

Default: “http://localhost:8080

-u, --user Galaxy user name
-p, --password Password for the Galaxy user
-a, --api_key Galaxy admin user API key (required if not defined in the tools list file)

update

This updates all tools in Galaxy to the latest revision. Use shed-tools update –help for more information

shed-tools update [-h] [-v] [--log_file LOG_FILE] [-g GALAXY] [-u USER]
                  [-p PASSWORD] [-a API_KEY] [-t TOOL_LIST_FILE]
                  [-y TOOL_YAML] [--name NAME] [--owner OWNER]
                  [--revisions [REVISIONS [REVISIONS ...]]]
                  [--toolshed TOOL_SHED_URL] [--install_tool_dependencies]
                  [--skip_install_resolver_dependencies]
                  [--skip_install_repository_dependencies] [--test]
                  [--test_existing] [--test_json TEST_JSON]
                  [--test_user_api_key TEST_USER] [--test_user TEST_USER]
Named Arguments
-t, --toolsfile
 Tools file to use (see tool_list.yaml.sample)
-y, --yaml_tool
 Install tool represented by yaml string
--name The name of the tool to install (only applicable if the tools file is not provided).
--owner The owner of the tool to install (only applicable if the tools file is not provided).
--revisions The revisions of the tool repository that will be installed. All revisions must be specified after this flag by a space.Example: –revisions 0a5c7992b1ac f048033da666(Only applicable if the tools file is not provided).
--toolshed The Tool Shed URL where to install the tool from. This is applicable only if the tool info is provided as an option vs. in the tools file.
--install_tool_dependencies
 

Turn on installation of tool dependencies using classic toolshed packages. Can be overwritten on a per-tool basis in the tools file.

Default: False

--skip_install_resolver_dependencies
 

Skip installing tool dependencies through resolver (e.g. conda). Will be ignored on galaxy releases older than 16.07. Can be overwritten on a per-tool basis in the tools file

Default: True

--skip_install_repository_dependencies
 

Skip installing the repository dependencies.

Default: True

--test

Run tool tests on install tools, requires Galaxy 18.05 or newer.

Default: False

--test_existing
 

If testing tools during install, also run tool tests on repositories already installed (i.e. skipped repositories).

Default: False

--test_json

If testing tools, record tool test output to specified file. This file can be turned into reports with planemo test_reports <output.json>.

Default: “tool_test_output.json”

--test_user_api_key
 If testing tools, a user is needed to execute the tests. This can be different the –api_key which is assumed to be an admin key. If –api_key is a valid user (e.g. it is not a master API key) this does not need to be specified and –api_key will be reused.
--test_user If testing tools, a user is needed to execute the tests. If –api_key is a master api key (i.e. not tied to a real user) and –test_user_api_key isn’t specified, this user email will be used. This user will be created if needed.
General options
-v, --verbose

Increase output verbosity.

Default: False

--log_file Where the log file should be stored. Default is a file in your system’s temp folder
Galaxy connection
-g, --galaxy

Target Galaxy instance URL/IP address

Default: “http://localhost:8080

-u, --user Galaxy user name
-p, --password Password for the Galaxy user
-a, --api_key Galaxy admin user API key (required if not defined in the tools list file)

test

This tests the supplied list of tools in Galaxy. Use shed-tools test –help for more information

shed-tools test [-h] [-v] [--log_file LOG_FILE] [-g GALAXY] [-u USER]
                [-p PASSWORD] [-a API_KEY] [-t TOOL_LIST_FILE] [-y TOOL_YAML]
                [--name NAME] [--owner OWNER]
                [--revisions [REVISIONS [REVISIONS ...]]]
                [--toolshed TOOL_SHED_URL] [--test_json TEST_JSON]
                [--test_user_api_key TEST_USER_API_KEY]
                [--test_user TEST_USER]
Named Arguments
-t, --toolsfile
 Tools file to use (see tool_list.yaml.sample)
-y, --yaml_tool
 Install tool represented by yaml string
--name The name of the tool to install (only applicable if the tools file is not provided).
--owner The owner of the tool to install (only applicable if the tools file is not provided).
--revisions The revisions of the tool repository that will be installed. All revisions must be specified after this flag by a space.Example: –revisions 0a5c7992b1ac f048033da666(Only applicable if the tools file is not provided).
--toolshed The Tool Shed URL where to install the tool from. This is applicable only if the tool info is provided as an option vs. in the tools file.
--test_json

Record tool test output to specified file. This file can be turned into reports with planemo test_reports <output.json>.

Default: “tool_test_output.json”

--test_user_api_key
 A user is needed to execute the tests. This can be different the –api_key which is assumed to be an admin key. If –api_key is a valid user (e.g. it is not a master API key) this does not need to be specified and –api_key will be reused.
--test_user A user is needed to execute the tests. If –api_key is a master api key (i.e. not tied to a real user) and –test_user_api_key isn’t specified, this user email will be used. This user will be created if needed.
General options
-v, --verbose

Increase output verbosity.

Default: False

--log_file Where the log file should be stored. Default is a file in your system’s temp folder
Galaxy connection
-g, --galaxy

Target Galaxy instance URL/IP address

Default: “http://localhost:8080

-u, --user Galaxy user name
-p, --password Password for the Galaxy user
-a, --api_key Galaxy admin user API key (required if not defined in the tools list file)