commit/galaxy-central: 13 new changesets
13 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5b6306be4e4c/ Changeset: 5b6306be4e4c User: jmchilton Date: 2013-03-22 06:41:08 Summary: Refactor tool loading and macro preprocessing stuff into its own module, implement unit tests for basic functionality. Affected #: 2 files diff -r 14ab08c0fbfe3e9735e94f4e399aeabc870fe4b2 -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -29,7 +29,6 @@ from mako.template import Template from paste import httpexceptions from sqlalchemy import and_ -from copy import deepcopy from galaxy import jobs, model from galaxy.datatypes.metadata import JobExternalOutputMetadataWrapper @@ -58,6 +57,7 @@ from galaxy.web import url_for from galaxy.web.form_builder import SelectField from tool_shed.util import shed_util_common +from .loader import load_tool log = logging.getLogger( __name__ ) @@ -577,7 +577,7 @@ def load_tool( self, config_file, guid=None, **kwds ): """Load a single tool from the file named by `config_file` and return an instance of `Tool`.""" # Parse XML configuration file and get the root element - tree = self._load_and_preprocess_tool_xml( config_file ) + tree = load_tool( config_file ) root = tree.getroot() # Allow specifying a different tool subclass to instantiate if root.find( "type" ) is not None: @@ -762,102 +762,6 @@ return rval - def _load_and_preprocess_tool_xml(self, config_file): - tree = parse_xml(config_file) - root = tree.getroot() - macros_el = root.find('macros') - if not macros_el: - return tree - tool_dir = os.path.dirname(config_file) - macros = self._load_macros(macros_el, tool_dir) - - self._expand_macros([root], macros) - return tree - - def _expand_macros(self, elements, macros): - for element in elements: - # HACK for elementtree, newer implementations (etree/lxml) won't - # require this parent_map data structure but elementtree does not - # track parents or recongnize .find('..'). - parent_map = dict((c, p) for p in element.getiterator() for c in p) - for expand_el in element.findall('.//expand'): - macro_name = expand_el.get('macro') - macro_def = deepcopy(macros[macro_name]) # deepcopy needed? - - yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')] - - expand_el_children = expand_el.getchildren() - macro_def_parent_map = \ - dict((c, p) for macro_def_el in macro_def for p in macro_def_el.getiterator() for c in p) - - for yield_el in yield_els: - self._xml_replace(yield_el, expand_el_children, macro_def_parent_map) - - # Recursively expand contained macros. - self._expand_macros(macro_def, macros) - self._xml_replace(expand_el, macro_def, parent_map) - - def _load_macros(self, macros_el, tool_dir): - macros = {} - # Import macros from external files. - macros.update(self._load_imported_macros(macros_el, tool_dir)) - # Load all directly defined macros. - macros.update(self._load_embedded_macros(macros_el, tool_dir)) - return macros - - def _load_embedded_macros(self, macros_el, tool_dir): - macros = {} - - macro_els = [] - if macros_el: - macro_els = macros_el.findall("macro") - for macro in macro_els: - macro_name = macro.get("name") - macros[macro_name] = self._load_macro_def(macro) - - return macros - - def _load_imported_macros(self, macros_el, tool_dir): - macros = {} - - macro_import_els = [] - if macros_el: - macro_import_els = macros_el.findall("import") - for macro_import_el in macro_import_els: - raw_import_path = macro_import_el.text - tool_relative_import_path = \ - os.path.basename(raw_import_path) # Sanitize this - import_path = \ - os.path.join(tool_dir, tool_relative_import_path) - file_macros = self._load_macro_file(import_path, tool_dir) - macros.update(file_macros) - - return macros - - def _load_macro_file(self, path, tool_dir): - tree = parse_xml(path) - root = tree.getroot() - return self._load_macros(root, tool_dir) - - def _load_macro_def(self, macro): - return list(macro.getchildren()) - - def _xml_replace(self, query, targets, parent_map): - #parent_el = query.find('..') ## Something like this would be better with newer xml library - parent_el = parent_map[query] - matching_index = -1 - #for index, el in enumerate(parent_el.iter('.')): ## Something like this for newer implementation - for index, el in enumerate(parent_el.getchildren()): - if el == query: - matching_index = index - break - assert matching_index >= 0 - current_index = matching_index - for target in targets: - current_index += 1 - parent_el.insert(current_index, deepcopy(target)) - parent_el.remove(query) - class ToolSection( object ): """ diff -r 14ab08c0fbfe3e9735e94f4e399aeabc870fe4b2 -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 lib/galaxy/tools/loader.py --- /dev/null +++ b/lib/galaxy/tools/loader.py @@ -0,0 +1,223 @@ +from __future__ import with_statement + +from copy import deepcopy +import os + +from galaxy.util import parse_xml + + +def load_tool(path): + """ + Loads tool from file system and preprocesses tool macros. + """ + tree = parse_xml(path) + root = tree.getroot() + macros_el = root.find('macros') + if not macros_el: + return tree + tool_dir = os.path.dirname(path) + macros = _load_macros(macros_el, tool_dir) + + _expand_macros([root], macros) + return tree + + +def _expand_macros(elements, macros): + for element in elements: + # HACK for elementtree, newer implementations (etree/lxml) won't + # require this parent_map data structure but elementtree does not + # track parents or recongnize .find('..'). + parent_map = dict((c, p) for p in element.getiterator() for c in p) + for expand_el in element.findall('.//expand'): + macro_name = expand_el.get('macro') + macro_def = deepcopy(macros[macro_name]) # deepcopy needed? + + yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')] + + expand_el_children = expand_el.getchildren() + macro_def_parent_map = \ + dict((c, p) for macro_def_el in macro_def for p in macro_def_el.getiterator() for c in p) + + for yield_el in yield_els: + _xml_replace(yield_el, expand_el_children, macro_def_parent_map) + + # Recursively expand contained macros. + _expand_macros(macro_def, macros) + _xml_replace(expand_el, macro_def, parent_map) + + +def _load_macros(macros_el, tool_dir): + macros = {} + # Import macros from external files. + macros.update(_load_imported_macros(macros_el, tool_dir)) + # Load all directly defined macros. + macros.update(_load_embedded_macros(macros_el, tool_dir)) + return macros + + +def _load_embedded_macros(macros_el, tool_dir): + macros = {} + + macro_els = [] + if macros_el: + macro_els = macros_el.findall("macro") + for macro in macro_els: + macro_name = macro.get("name") + macros[macro_name] = _load_macro_def(macro) + + return macros + + +def _load_imported_macros(macros_el, tool_dir): + macros = {} + + macro_import_els = [] + if macros_el: + macro_import_els = macros_el.findall("import") + for macro_import_el in macro_import_els: + raw_import_path = macro_import_el.text + tool_relative_import_path = \ + os.path.basename(raw_import_path) # Sanitize this + import_path = \ + os.path.join(tool_dir, tool_relative_import_path) + file_macros = _load_macro_file(import_path, tool_dir) + macros.update(file_macros) + + return macros + + +def _load_macro_file(path, tool_dir): + tree = parse_xml(path) + root = tree.getroot() + return _load_macros(root, tool_dir) + + +def _load_macro_def(macro): + return list(macro.getchildren()) + + +def _xml_replace(query, targets, parent_map): + #parent_el = query.find('..') ## Something like this would be better with newer xml library + parent_el = parent_map[query] + matching_index = -1 + #for index, el in enumerate(parent_el.iter('.')): ## Something like this for newer implementation + for index, el in enumerate(parent_el.getchildren()): + if el == query: + matching_index = index + break + assert matching_index >= 0 + current_index = matching_index + for target in targets: + current_index += 1 + parent_el.insert(current_index, deepcopy(target)) + parent_el.remove(query) + + +def test_loader(): + """ + Function to test this module. Galaxy doesn't seem to have a + place to put unit tests that are not doctests. These tests can + be run with nosetests via the following command: + + % nosetests --with-doctest lib/galaxy/tools/loader.py + + """ + from tempfile import mkdtemp + from shutil import rmtree + + class TestToolDirectory(object): + def __init__(self): + self.temp_directory = mkdtemp() + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + rmtree(self.temp_directory) + + def write(self, contents, name="tool.xml"): + open(os.path.join(self.temp_directory, name), "w").write(contents) + + def load(self, name="tool.xml", preprocess=True): + if preprocess: + loader = load_tool + else: + loader = parse_xml + return loader(os.path.join(self.temp_directory, name)) + + ## Test simple macro replacement. + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <expand macro="inputs" /> + <macros> + <macro name="inputs"> + <inputs /> + </macro> + </macros> +</tool>''') + xml = tool_dir.load(preprocess=False) + assert xml.find("inputs") is None + xml = tool_dir.load(preprocess=True) + assert xml.find("inputs") is not None + + # Test importing macros from external files + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <expand macro="inputs" /> + <macros> + <import>external.xml</import> + </macros> +</tool>''') + + tool_dir.write(''' +<macros> + <macro name="inputs"> + <inputs /> + </macro> +</macros>''', name="external.xml") + xml = tool_dir.load(preprocess=False) + assert xml.find("inputs") is None + xml = tool_dir.load(preprocess=True) + assert xml.find("inputs") is not None + + # Test macros with unnamed yield statements. + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <expand macro="inputs"> + <input name="first_input" /> + </expand> + <macros> + <macro name="inputs"> + <inputs> + <yield /> + </inputs> + </macro> + </macros> +</tool>''') + xml = tool_dir.load() + assert xml.find("inputs").find("input").get("name") == "first_input" + + # Test recursive macro applications. + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <expand macro="inputs"> + <input name="first_input" /> + <expand macro="second" /> + </expand> + <macros> + <macro name="inputs"> + <inputs> + <yield /> + </inputs> + </macro> + <macro name="second"> + <input name="second_input" /> + </macro> + </macros> +</tool>''') + xml = tool_dir.load() + assert xml.find("inputs").findall("input")[1].get("name") == "second_input" https://bitbucket.org/galaxy/galaxy-central/commits/8400b75d0a68/ Changeset: 8400b75d0a68 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Refactor macro stuff to allow multiple macro types (default type is xml, <xml> will be short for <macro type="xml"), improves ordering of interleaving imports and embedded macros. Affected #: 1 file diff -r 5b6306be4e4c7f20b6b4e473449cbe7a02ebe921 -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c lib/galaxy/tools/loader.py --- a/lib/galaxy/tools/loader.py +++ b/lib/galaxy/tools/loader.py @@ -13,12 +13,17 @@ tree = parse_xml(path) root = tree.getroot() macros_el = root.find('macros') - if not macros_el: - return tree tool_dir = os.path.dirname(path) - macros = _load_macros(macros_el, tool_dir) - _expand_macros([root], macros) + if macros_el: + macro_els = _load_macros(macros_el, tool_dir) + _xml_set_children(macros_el, macro_els) + + macro_dict = dict([(macro_el.get("name"), list(macro_el.getchildren())) \ + for macro_el in macro_els \ + if macro_el.get('type') == 'xml']) + _expand_macros([root], macro_dict) + return tree @@ -30,6 +35,7 @@ parent_map = dict((c, p) for p in element.getiterator() for c in p) for expand_el in element.findall('.//expand'): macro_name = expand_el.get('macro') + print macros.keys() macro_def = deepcopy(macros[macro_name]) # deepcopy needed? yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')] @@ -47,29 +53,43 @@ def _load_macros(macros_el, tool_dir): - macros = {} + macros = [] # Import macros from external files. - macros.update(_load_imported_macros(macros_el, tool_dir)) + macros.extend(_load_imported_macros(macros_el, tool_dir)) # Load all directly defined macros. - macros.update(_load_embedded_macros(macros_el, tool_dir)) + macros.extend(_load_embedded_macros(macros_el, tool_dir)) return macros def _load_embedded_macros(macros_el, tool_dir): - macros = {} + macros = [] macro_els = [] + # attribute typed macro if macros_el: macro_els = macros_el.findall("macro") for macro in macro_els: - macro_name = macro.get("name") - macros[macro_name] = _load_macro_def(macro) + if 'type' not in macro.attrib: + macro.attrib['type'] = 'xml' + macros.append(macro) + + # type shortcuts (<xml> is a shortcut for <macro type="xml", + # likewise for <template>. + typed_tag = ['xml'] + for tag in typed_tag: + macro_els = [] + if macros_el: + macro_els = macros_el.findall(tag) + for macro_el in macro_els: + macro_el.attrib['type'] = tag + macro_el.tag = 'macro' + macros.append(macro_el) return macros def _load_imported_macros(macros_el, tool_dir): - macros = {} + macros = [] macro_import_els = [] if macros_el: @@ -81,7 +101,7 @@ import_path = \ os.path.join(tool_dir, tool_relative_import_path) file_macros = _load_macro_file(import_path, tool_dir) - macros.update(file_macros) + macros.extend(file_macros) return macros @@ -96,6 +116,13 @@ return list(macro.getchildren()) +def _xml_set_children(element, new_children): + for old_child in element.getchildren(): + element.remove(old_child) + for i, new_child in enumerate(new_children): + element.insert(i, new_child) + + def _xml_replace(query, targets, parent_map): #parent_el = query.find('..') ## Something like this would be better with newer xml library parent_el = parent_map[query] @@ -119,7 +146,7 @@ place to put unit tests that are not doctests. These tests can be run with nosetests via the following command: - % nosetests --with-doctest lib/galaxy/tools/loader.py + % nosetests lib/galaxy/tools/loader.py """ from tempfile import mkdtemp @@ -221,3 +248,17 @@ </tool>''') xml = tool_dir.load() assert xml.find("inputs").findall("input")[1].get("name") == "second_input" + + # Test <xml> is shortcut for macro type="xml" + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <expand macro="inputs" /> + <macros> + <xml name="inputs"> + <inputs /> + </xml> + </macros> +</tool>''') + xml = tool_dir.load(preprocess=True) + assert xml.find("inputs") is not None https://bitbucket.org/galaxy/galaxy-central/commits/96aae9b33613/ Changeset: 96aae9b33613 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Implement 'template' macros that define variables which are made available to cheetah templates. Affected #: 2 files diff -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c -r 96aae9b336130398250524311b4b69c432a44966 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -57,7 +57,7 @@ from galaxy.web import url_for from galaxy.web.form_builder import SelectField from tool_shed.util import shed_util_common -from .loader import load_tool +from .loader import load_tool, template_macro_params log = logging.getLogger( __name__ ) @@ -1246,6 +1246,7 @@ # thus hardcoded) FIXME: hidden parameters aren't # parameters at all really, and should be passed in a different # way, making this check easier. + self.template_macro_params = template_macro_params(root) for param in self.inputs.values(): if not isinstance( param, ( HiddenToolParameter, BaseURLToolParameter ) ): self.input_required = True @@ -2367,7 +2368,7 @@ `to_param_dict_string` method of the associated input. """ param_dict = dict() - + param_dict.update(self.template_macro_params) # All parameters go into the param_dict param_dict.update( incoming ) diff -r 8400b75d0a688ec4a6a07e2e5aa98ef9dcbb193c -r 96aae9b336130398250524311b4b69c432a44966 lib/galaxy/tools/loader.py --- a/lib/galaxy/tools/loader.py +++ b/lib/galaxy/tools/loader.py @@ -12,22 +12,51 @@ """ tree = parse_xml(path) root = tree.getroot() + + _import_macros(root, path) + + # Expand xml macros + macro_dict = _macros_of_type(root, 'xml', lambda el: list(el.getchildren())) + _expand_macros([root], macro_dict) + + return tree + + +def template_macro_params(root): + """ + Look for template macros and populate param_dict (for cheetah) + with these. + """ + param_dict = {} + macro_dict = _macros_of_type(root, 'template', lambda el: el.text) + for key, value in macro_dict.iteritems(): + param_dict[key] = value + return param_dict + + +def _import_macros(root, path): + tool_dir = os.path.dirname(path) macros_el = root.find('macros') - tool_dir = os.path.dirname(path) - if macros_el: macro_els = _load_macros(macros_el, tool_dir) _xml_set_children(macros_el, macro_els) - macro_dict = dict([(macro_el.get("name"), list(macro_el.getchildren())) \ + +def _macros_of_type(root, type, el_func): + macros_el = root.find('macros') + macro_dict = {} + if macros_el: + macro_els = macros_el.findall('macro') + macro_dict = dict([(macro_el.get("name"), el_func(macro_el)) \ for macro_el in macro_els \ - if macro_el.get('type') == 'xml']) - _expand_macros([root], macro_dict) - - return tree + if macro_el.get('type') == type]) + return macro_dict def _expand_macros(elements, macros): + if not macros: + return + for element in elements: # HACK for elementtree, newer implementations (etree/lxml) won't # require this parent_map data structure but elementtree does not @@ -35,7 +64,6 @@ parent_map = dict((c, p) for p in element.getiterator() for c in p) for expand_el in element.findall('.//expand'): macro_name = expand_el.get('macro') - print macros.keys() macro_def = deepcopy(macros[macro_name]) # deepcopy needed? yield_els = [yield_el for macro_def_el in macro_def for yield_el in macro_def_el.findall('.//yield')] @@ -75,7 +103,7 @@ # type shortcuts (<xml> is a shortcut for <macro type="xml", # likewise for <template>. - typed_tag = ['xml'] + typed_tag = ['template', 'xml'] for tag in typed_tag: macro_els = [] if macros_el: @@ -260,5 +288,20 @@ </xml></macros></tool>''') - xml = tool_dir.load(preprocess=True) + xml = tool_dir.load() assert xml.find("inputs") is not None + + with TestToolDirectory() as tool_dir: + tool_dir.write(''' +<tool> + <command interpreter="python">tool_wrapper.py + #include source=$tool_params + </command> + <macros> + <template name="tool_params">-a 1 -b 2</template> + </macros> +</tool> +''') + xml = tool_dir.load() + params_dict = template_macro_params(xml.getroot()) + assert params_dict['tool_params'] == "-a 1 -b 2" https://bitbucket.org/galaxy/galaxy-central/commits/dd8e910f6d30/ Changeset: dd8e910f6d30 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Add GATK macros file and import in each wrapper. Affected #: 17 files diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/analyze_covariates.xml --- a/tools/gatk/analyze_covariates.xml +++ b/tools/gatk/analyze_covariates.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/count_covariates.xml --- a/tools/gatk/count_covariates.xml +++ b/tools/gatk/count_covariates.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/depth_of_coverage.xml --- a/tools/gatk/depth_of_coverage.xml +++ b/tools/gatk/depth_of_coverage.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/gatk_macros.xml --- /dev/null +++ b/tools/gatk/gatk_macros.xml @@ -0,0 +1,2 @@ +<macros> +</macros> \ No newline at end of file diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/indel_realigner.xml --- a/tools/gatk/indel_realigner.xml +++ b/tools/gatk/indel_realigner.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/print_reads.xml --- a/tools/gatk/print_reads.xml +++ b/tools/gatk/print_reads.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/realigner_target_creator.xml --- a/tools/gatk/realigner_target_creator.xml +++ b/tools/gatk/realigner_target_creator.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.3">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/table_recalibration.xml --- a/tools/gatk/table_recalibration.xml +++ b/tools/gatk/table_recalibration.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/unified_genotyper.xml --- a/tools/gatk/unified_genotyper.xml +++ b/tools/gatk/unified_genotyper.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_annotator.xml --- a/tools/gatk/variant_annotator.xml +++ b/tools/gatk/variant_annotator.xml @@ -4,6 +4,9 @@ <requirement type="package" version="1.4">gatk</requirement><requirement type="package">samtools</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_apply_recalibration.xml --- a/tools/gatk/variant_apply_recalibration.xml +++ b/tools/gatk/variant_apply_recalibration.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_combine.xml --- a/tools/gatk/variant_combine.xml +++ b/tools/gatk/variant_combine.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_eval.xml --- a/tools/gatk/variant_eval.xml +++ b/tools/gatk/variant_eval.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py #from binascii import hexlify --max_jvm_heap_fraction "1" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_filtration.xml --- a/tools/gatk/variant_filtration.xml +++ b/tools/gatk/variant_filtration.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py #from binascii import hexlify --max_jvm_heap_fraction "1" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_recalibrator.xml --- a/tools/gatk/variant_recalibrator.xml +++ b/tools/gatk/variant_recalibrator.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variant_select.xml --- a/tools/gatk/variant_select.xml +++ b/tools/gatk/variant_select.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py #from binascii import hexlify --max_jvm_heap_fraction "1" diff -r 96aae9b336130398250524311b4b69c432a44966 -r dd8e910f6d30086bb8fcacdc400fe2ee2305d991 tools/gatk/variants_validate.xml --- a/tools/gatk/variants_validate.xml +++ b/tools/gatk/variants_validate.xml @@ -3,6 +3,9 @@ <requirements><requirement type="package" version="1.4">gatk</requirement></requirements> + <macros> + <import>gatk_macros.xml</import> + </macros><command interpreter="python">gatk_wrapper.py --max_jvm_heap_fraction "1" --stdout "${output_log}" https://bitbucket.org/galaxy/galaxy-central/commits/1857f97b6772/ Changeset: 1857f97b6772 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Create shared cheetah template variable for gatk standard options. Affected #: 16 files Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/0be733a1029e/ Changeset: 0be733a1029e User: jmchilton Date: 2013-03-22 06:41:08 Summary: Refactor big GATK parameter type conditional into shared macro for 15 GATK tools. Affected #: 16 files Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/83ff3052f4b6/ Changeset: 83ff3052f4b6 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Implement another macro type (token) that performs direct string substition on element text. Affected #: 1 file Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/6ec03dde4504/ Changeset: 6ec03dde4504 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Extend token macro expansion to include XML attributes. Optimize expansion performance slightly. Affected #: 1 file Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/ca5333e3daaf/ Changeset: ca5333e3daaf User: jmchilton Date: 2013-03-22 06:41:08 Summary: Refactor GATK wrappers to use token macros to eliminate duplication in citation section. Affected #: 17 files Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/c28e4c6eced2/ Changeset: c28e4c6eced2 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Covert more duplicated GATK wrapper code to macros. Affected #: 16 files Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/71caf4b3d201/ Changeset: 71caf4b3d201 User: jmchilton Date: 2013-03-22 06:41:08 Summary: Remove unused code in lib/galaxy/tools/loader.py Affected #: 1 file Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/2c39e7cb976f/ Changeset: 2c39e7cb976f User: jmchilton Date: 2013-03-31 19:39:20 Summary: Tool Macros: Added test case for doubly recursive macros. Implement bug fix and refactor to simplify things and make problem/fix more obvious. Affected #: 1 file Diff not available. https://bitbucket.org/galaxy/galaxy-central/commits/8fc56b85e0a5/ Changeset: 8fc56b85e0a5 User: jgoecks Date: 2013-04-08 23:10:21 Summary: Merged in galaxyp/galaxy-central-parallelism-refactorings (pull request #140) Improvements to Tool XML Macroing System Affected #: 19 files Diff not available. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org