Galaxy tools use underlying command-line software which are specified using
<requirement> tags in the XML wrapper. If developers continue to release new versions of the software, the creator/maintainer needs to ensure that the tool requirements are bumped, otherwise the tool will become updated.
Planemo provides a
autoupdate subcommand which can be used to perform this task automatically. Basic usage is as follows:
planemo autoupdate tool_wrapper.xml
- There are various flags which can be applied; these are some of the most important:
--recursive, which performs the autoupdate recursively on subdirectories
--dry-run, which checks if tool requirements are up-to-date without making the necessary change automatically
--test, which runs tests on all autoupdated tools. If this flag is used, all options available for
planemo testare also available.
--testis also selected) which will update test data for failed tests
--skiplist, pointing to a list of tool wrappers for which updates should be skipped
--skip_requirementswith a comma-separated list of packages not to update.
r-baseare skipped by default.
One of the most efficient ways to use it is by implementing a CI cron job which runs the command on an entire GitHub repository of tool wrappers.
autoupdate assumes that XML tools are formatted in a certain way - in accordance with the IUC best practices. In particular:
- the tool
versionattribute must be set to
- A token
@TOOL_VERSION@should be created which corresponds to the version number of the main requirement.
- Optionally, a token
@VERSION_SUFFIX@should be created, which should be an integer representing the number of times the XML wrapper has been updated since
autoupdate subcommand can also be used to automatically update workflows so that they are using the most recent Galaxy tools available.
planemo autoupdate workflow.ga
In the basic usage with the above command, a local Galaxy instance will be spun up and the workflow uploaded, refactored to include the most recent tool versions, and re-downloaded.
Workflows can also be updated against an external Galaxy server; see the example below. (Please note the server must be running Galaxy version 21.05 or more recent.)
planemo autoupdate workflow.ga --profile usegalaxy-eu
In this case, the workflow returned will contain the most recent tool and subworkflow versions available on that Galaxy server.
An equivalent alternative, if you don’t want to use Planemo profiles, is the following:
planemo autoupdate workflow.ga --galaxy_url SERVER_URL --galaxy_user_key API_KEY