TADbit
TADbit copied to clipboard
dangling end assignment inconsistent
Reads such as
SRR824846.13697468 chr1 1089822 0 40 1089763 1091430 chr1 1089763 1 40 1086687 1089763
should be marked as dangling end, but they are not. There are a lot of reads like this (although they will be marked as extra dangling-end
). I think it is due to the following condition being inappropriate in filter.py
:
if (ps2 > ps1) == sd2
line 201
which does not treat the case ps2==ps1 properly.
Confirmed, checking solution consisting in changing the import at https://github.com/3DGenomes/TADbit/blob/master/_pytadbit/parsers/map_parser.py#L6 from:
from bisect import bisect_left as bisect
to:
from bisect import bisect_right as bisect
Have to update test also. this is an important bug, thanks @yannickspill
Another issue: when a read is mapped on the reverse strand just before the restriction site
-----A|AGCT T--------------
-----T TCGA|A--------------
=========>
^
|
From here
It's an Extra-dangling end, but it is interpreted as dangling-end as the RE site position used is the one on the forward strand.
should change this also.