1) it does not do a sanity check for NaN values when the name_attr is not set to auto. This means that any NaN will be passed as a label to DnaFeaturesViewer and the code will crash because it tries to split a float.
2) The regex will no work if name_attr is the last of the list.
The code can be fixed doing a sanity check for NaN out outside of the if..else and adjusting the regular expression pattern, in the following way:
I'm very sorry, I currently don't have the time and energy to maintain this project. Thank you very much for your suggestion. If you could submit a Pull Request, I would be happy to merge it.
Hi, the code below is problematic for two reasons:
https://github.com/GangCaoLab/CoolBox/blob/36a86b20e032c6200d6f4077a5b241c0dbda2a78/coolbox/core/track/gtf.py#L109-L123
1) it does not do a sanity check for
NaN
values when thename_attr
is not set toauto
. This means that anyNaN
will be passed as a label to DnaFeaturesViewer and the code will crash because it tries to split a float. 2) The regex will no work if name_attr is the last of the list.The code can be fixed doing a sanity check for NaN out outside of the if..else and adjusting the regular expression pattern, in the following way:
Hope this helps.