billgreenwald / pgltools

Paired Genomic Loci Tool Suite
BSD 3-Clause "New" or "Revised" License
29 stars 5 forks source link

intersect1D "UnboundLocalError: local variable 'Aannots' referenced before assignment" error triggered by Inter-chromosomal interactions #12

Closed SplitInf closed 1 year ago

SplitInf commented 2 years ago

Hi,

Thanks for making the tool available to the community. I noticed a bug when running intersect1D when the -b file contains a target that intersects with a inter-chrom interaction event. A workaround I noticed was if you add a dummy intra-chrom interaction into -a and -b file this error wouldn't be triggered. [pgltools 2.2.0]

SplitInf commented 2 years ago

i̶s̶s̶u̶e̶s̶ ̶r̶e̶s̶o̶l̶v̶e̶d̶ ̶w̶i̶t̶h̶ ̶f̶o̶r̶m̶a̶t̶b̶e̶d̶p̶e̶

SplitInf commented 2 years ago

Nope, problem persisted. It's not because of sorting.

billgreenwald commented 2 years ago

Hey I am getting around to responding to some of these, apologies for it being so long. Still having an issue/using the tool?

auberginekenobi commented 2 years ago

Hi Bill, Yep, just encountered the same problem with the same use case.

SplitInf commented 2 years ago

Hi Bill, yes this is still a problem. Sorry for the poorly worded description, but the examples should help.

SplitInf commented 2 years ago

erkk, sorry closed ticket by mistake.

billgreenwald commented 2 years ago

Should be fixed in 5662fa4e0c85702e6a1247a662cfaedb473f9965, try pulling and running

billgreenwald commented 2 years ago

This is also added as an explicit test case in the above push, and is pulled in to the 3.0.0 update, so this shouldnt be a problem. If any other behaviors come up let me know since its now easy to just add more tests.

If one of the original commenters can confirm it now works for them, please close when you comment back :)

SplitInf commented 1 year ago

seems to work now! thank you