asl / BandageNG

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

Perpetual loading bar on small GFA #121

Closed rlorigro closed 2 years ago

rlorigro commented 2 years ago

Hi,

This GFA fails to load in BandageNG, but loads within seconds in original Bandage: https://rlorigro-public-files.s3.us-west-1.amazonaws.com/gfase/paolo_ul_guppy6_run14/test_subset/run14_uul_test_subset.gfa

It contains 1436 nodes, totaling 263Mbp

Thanks

asl commented 2 years ago

Sadly we do not have a good way to report GFA format errors. In your case you're having invalid GFA tags, e.g.:

CL:z:#1baf1b

Note that z is a not a valid tag type (see https://github.com/GFA-spec/GFA-spec/blob/master/GFA1.md#optional-fields for more information)

rlorigro commented 2 years ago

OK. Just to clarify, I think the original bandage created this tag during the save visible graph to GFA operation. It probably cached the colors from a CSV I loaded

rlorigro commented 2 years ago

Does it make sense to make this backwards compatible to the extent that it does not crash during loading? Even if it ignores the tag

asl commented 2 years ago

Well, in the reality the invalid lines are dropped. It's the error reporting that takes time as it tries to print all these long segment lines with error location, etc. to stdout.