TADbit icon indicating copy to clipboard operation
TADbit copied to clipboard

dangling end assignment inconsistent

Open yannickspill opened this issue 9 years ago • 2 comments

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.

yannickspill avatar Jan 07 '16 13:01 yannickspill

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

fransua avatar Jan 12 '16 11:01 fransua

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.

fransua avatar Jan 13 '16 15:01 fransua