asl / BandageNG

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
GNU General Public License v3.0
112 stars 10 forks source link

A specific GFA won't open #119

Closed RolandFaure closed 1 year ago

RolandFaure commented 1 year ago

Hi, Thank you for developing this tool, it is great! I stumbled on a problem today when trying to open a specific GFA. Bandage-NG took forever to load and then all the contigs were of size 0. The problem disappeared if I put " * " instead of the actual sequences. I opened it with the old Bandage without problems.

The file is attached to this issue small_graph.gfa.gz

Thanks

asl commented 1 year ago

So far we do not have a good way to show GFA format parsing errors. In your particular case you're having a malformed GFA file. Let me show what is going on:

LN:i:3003250<tab>rd:i:49<tab><newline>

Note that you're having an extra tab after the last tag and therefore you're having and empty tag, without name, type, etc.

asl commented 1 year ago

How have you obtained this GFA? Have you generated it manually? Or it's an output from some tool?

RolandFaure commented 1 year ago

It's the output from GraphUnzip, which is a tool I develop. I will make sure there are no more formatting errors :grin: Thank you very much!

asl commented 1 year ago

I would suggest you to follow GFA spec: https://github.com/GFA-spec/GFA-spec/blob/master/GFA1.md Bandage-NG parser follows spec quite strictly as otherwise it is impossible to implement fast streaming GFA parser.