vaquerizaslab / tadtool

TADtool is an interactive tool for the identification of meaningful parameters in TAD-calling algorithms for Hi-C data.
MIT License
43 stars 13 forks source link

Errors on 6-column bed file #7

Closed liz-is closed 7 years ago

liz-is commented 7 years ago

If I try to use a six-column bed file that just contain "." for score and name as the regions argument, I get the following error:

2017-07-19 16:35:57,776 INFO Loading regions...
Traceback (most recent call last):
  File "/home/lingsim/.linuxbrew/bin/tadtool", line 295, in <module>
    TADtool()
  File "/home/lingsim/.linuxbrew/bin/tadtool", line 40, in __init__
    getattr(self, args.command)()
  File "/home/lingsim/.linuxbrew/bin/tadtool", line 255, in tads
    regions = tad.load_regions(regions_file)
  File "/home/lingsim/.linuxbrew/opt/python3/lib/python3.6/site-packages/tadtool/tad.py", line 287, in load_regions
    ix = int(fields[3]) - 1
ValueError: invalid literal for int() with base 10: '.'

It looks like this is because if there are more than 3 columns in the bed file, tadtool assumes that it's HiCpro format (?). It would be great if tadtool was compatible with both HiCpro format and 6-column bed files without score/name info.

vaquerizaslab-old commented 7 years ago

Hi Liz,

I have changed this particular behavior somewhat.