brentp / bwa-meth

fast and accurate alignment of BS-Seq reads using bwa-mem and a 3-letter genome
https://arxiv.org/abs/1401.1129
MIT License
139 stars 53 forks source link

Help command for aligner command does not work #85

Closed slazicoicr closed 1 year ago

slazicoicr commented 1 year ago

The aligner command has the flags documented at https://github.com/brentp/bwa-meth/blob/master/bwameth.py#L522, but produces an error when called with bwameth.py -h or bwameth.py --help.

Traceback (most recent call last):
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/bwa-meth-0.2.5/bin/bwameth.py", line 559, in <module>
    main(sys.argv[1:])
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/bwa-meth-0.2.5/bin/bwameth.py", line 545, in main
    args, pass_through_args = p.parse_known_args(args)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 1859, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 2068, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 2008, in consume_optional
    take_action(action, args, option_string)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 1936, in take_action
    action(self, namespace, argument_values, option_string)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 1099, in __call__
    parser.print_help()
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 2556, in print_help
    self._print_message(self.format_help(), file)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 2540, in format_help
    return formatter.format_help()
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 283, in format_help
    help = self._root_section.format_help()
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 214, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 214, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 214, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 214, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 533, in _format_action
    help_text = self._expand_help(action)
  File "/.mounts/labs/gsi/modulator/sw/Ubuntu18.04/python-3.10.6/lib/python3.10/argparse.py", line 630, in _expand_help
    return self._get_help_string(action) % params
TypeError: %o format: an integer is required, not dict
boegel commented 1 year ago

fixed by escaping % in help text of --do-not-penalize-chimeras, see #87