Topmost parameter group must not be named '1' anymore to generate names for nested parameters
Luis de la Garza
7 years ago
674 | 674 | |
675 | 675 | |
676 | 676 | def get_param_name(param): |
677 | if type(param.parent) == ParameterGroup and param.parent.name != '1': | |
678 | return get_param_name(param.parent) + ":" + param.name | |
677 | # we generate parameters with colons for subgroups, but not for the topmost parents (OpenMS legacy) | |
678 | if type(param.parent) == ParameterGroup and param.parent.parent != None: | |
679 | return get_param_name(param.parent) + ":" + resolve_param_mapping(param) | |
679 | 680 | else: |
680 | return param.name | |
681 | return resolve_param_mapping(param) | |
682 | ||
683 | ||
684 | # some parameters are mapped to command line options, this method helps resolve those mappings, if any | |
685 | # TODO: implement mapping of parameters!!! | |
686 | def resolve_param_mapping(param): | |
687 | return param.name | |
681 | 688 | |
682 | 689 | |
683 | 690 | def create_command(tool, model, **kwargs): |