qbicsoftware / core-utils-lib

Library containing core classes and utilities that are independent of a portal.
MIT License
0 stars 0 forks source link

Empty metadata assignments read by Nanopore parser lead to arrayOutOfBoundsException #33

Open wow-such-code opened 4 years ago

wow-such-code commented 4 years ago

Expected Behaviour

The nanopore parser warns and does not validate data in case metadata fields are empty.

Observed Behaviour

The nanopore parser fails while trying to parse empty metadata fields, without throwing an informative warning

Steps to reproduce

Possible reasons

https://github.com/qbicsoftware/core-utils-lib/blob/5a070dbc86ebb3e30b18b6493991c2a46aa92695/src/main/groovy/life/qbic/utils/NanoporeParser.groovy#L100

There are already methods that test if some of the metadata is empty (see finalizeMetadata()), but the aforementioned code runs earlier, leading to an error.