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
144 stars 54 forks source link

Q: Issues with installation 0.2.5 #82

Closed sklages closed 1 year ago

sklages commented 2 years ago

Just a question, installing bwameth.py (master, 0.2.5) on Linux Mint (and some other systems), always results in an error when running --help oder -h ..

bwameth.py --help
Traceback (most recent call last):
  File "/package/sequencer/bwa-meth/bwa-meth.venv/bin/bwameth.py", line 4, in <module>
    __import__('pkg_resources').run_script('bwameth==0.2.5', 'bwameth.py')
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(code, namespace, namespace)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/bwameth-0.2.5-py3.9.egg/EGG-INFO/scripts/bwameth.py", line 559, in <module>
    main(sys.argv[1:])
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/bwameth-0.2.5-py3.9.egg/EGG-INFO/scripts/bwameth.py", line 545, in main
    args, pass_through_args = p.parse_known_args(args)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 1754, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 1960, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 1900, in consume_optional
    take_action(action, args, option_string)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 1828, in take_action
    action(self, namespace, argument_values, option_string)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 1021, in __call__
    parser.print_help()
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 2358, in print_help
    self._print_message(self.format_help(), file)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 2332, in format_help
    return formatter.format_help()
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 306, in format_help
    help = self._root_section.format_help()
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 236, in format_help
    func(*args)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 236, in format_help
    func(*args)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 542, in _format_action
    help_text = self._expand_help(action)
  File "/package/sequencer/bwa-meth/bwa-meth.venv/lib/python3.9/site-packages/argparse.py", line 628, in _expand_help
    return self._get_help_string(action) % params
TypeError: %o format: an integer is required, not dict

Same for Python 3.6, 3.8.10.

This is not a real problem, since index and and alignment seem to run smoothly (at least tested with bwa).

--help oder -h in 0.2.2 works fine. Any idea to fix this?

boegel commented 1 year ago

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