eHive provides a facility to modify many aspects of a pipeline that is loaded into a hive database. This is the tweak_pipeline.pl script. Using this script, users can change the values of analysis or pipeline-wide parameters. This script can also change resource classes for analyses, and it can even be used to alter the dataflow structure of a pipeline.
Basic operation
===============
Typically, tweak_pipeline.pl is invoked with two sets of parameters: the pipeline database (passed as a url (``-url``) or as part of a registry configuration (``-reg_conf``)), and a statement written in the tweak language (for details, see the :ref:`tweak-language-reference`). The tweak language is designed to be intuitive, consisting of a verb (``-SET``, ``-SHOW``, ``-DELETE``, or ``-tweak``) followed by the name of the attribute and the attribute's new value (if appropriate). Some examples:
Setting or changing attributes
------------------------------
- Set or change the value of a pipeline-wide parameter:
Remember that tweak_pipeline.pl only affects values in the hive database. In order to make tweaks permanent, the changes need to also be made in the corresponding PipeConfig file.
.. _tweak-language-reference:
Tweak language reference
========================
The tweak_pipeline.pl script uses a flexible language to specify which pipeline attributes to set, change, or show. Each tweak consists of a verb, followed by a description of the attribute. Finally, the new value for that attribute is given if required.
Verbs
-----
The verb can be one of four values:
- ``-SET``: changes the current value for the given attribute.
- ``-SHOW``: returns the current value for the given attribute.
- ``-DELETE``: deletes any value for the given attribute.
- ``-tweak``: generic invocation of a tweak.
- If ``-tweak`` is followed by an attribute name and a ``?``, then the current value of that attribute is returned - similar to ``-SHOW``. Example:
- If an attribute name is provided, along with a new value separated by ``=``, then the attribute's value is updated to the new value. This is the same as ``-SET``. Example:
The attribute being tweaked is identified using a two-part name, with the two parts separated by a dot.
- The first part identifies the "domain" of the attribute. This can be one of:
- pipeline
- analysis
- resource_class
- In the case of analysis or resource_class, the particular analysis or resource class is identified by placing the logic name in brackets like this:
``analysis[logic_name]`` e.g. ``analysis[dump_sequence]``
- The second part identifies the particular attribute within that domain to view, modify, or delete. Allowable values for this part depend on the domain: