methphaser icon indicating copy to clipboard operation
methphaser copied to clipboard

Possible no caught error for single blocks

Open sivico26 opened this issue 2 years ago • 0 comments

Hello there,

I just wanted to report what I think is a small error:

/home/sivico/mambaforge/envs/Phasing/bin/methphasing:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import require
Traceback (most recent call last):
  File "/home/sivico/mambaforge/envs/Phasing/bin/methphasing", line 1470, in <module>
    main(sys.argv[1:])
  File "/home/sivico/mambaforge/envs/Phasing/bin/methphasing", line 1395, in main
    max_expension_list_larger += [(phased_region_list[0][0], phased_region_list[1][0])]
IndexError: list index out of range

When I looked at the code, and considering my input, I think that this IndexError comes from the fact that the code is expecting at least 2 blocks to merge in any given sequence. If there is a sequence with a single block, instead of skipping the sequence (because there is nothing to do), it tries to index the second block that does not exist, and then the error emerges.

I hope this is helpful to you. Sivico

sivico26 avatar Aug 17 '23 14:08 sivico26