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.
When loading a full matrix, any length BED file should now work, ignoring additional columns.
When loading a sparse matrix, the fourth (name) column will now be interpreted as a unique region identifier. Columns 1 and 2 in the sparse matrix file now point to the region using the identifier rather than the default incremental index. This is to be compliant with HiC-Pro. If the name column in your BED only contains '.' or is not present, an incremental index is still used.
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:
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.