ggonnella / gfapy

Gfapy: a flexible and extensible software library for handling sequence graphs in Python
Other
65 stars 7 forks source link

Update integer.py to parse integers in exp notation #30

Open msgr0 opened 9 months ago

msgr0 commented 9 months ago

When integer value is given in exponential notation, python doesn't parse it as an integer resulting in not validating the gfa file. Casting to float and then to int resolves the issue.

msgr0 commented 9 months ago

example of given error on a skesa bacterial assembly .gfa file

gfapy.error.FormatError: Field: KC
  Datatype: i
  Content: 1.44333e+06
  invalid literal for int() with base 10: '1.44333e+06':the string does not represent a valid integer