SynBioDex / libSBOLj

Java Library for Synthetic Biology Open Language (SBOL)
Apache License 2.0
37 stars 24 forks source link

Invalid reporting of error sbol-11003 #621

Open jakebeal opened 2 years ago

jakebeal commented 2 years ago

I have a valid SBOL2 file for which the converter is reporting errors incorrectly, which I believe indicates an issue in the implementation of libSBOLj's validator.

Specifically, when validating this file (.txt added for GitHub upload): error_example.xml.txt

I get the following error:

sbol-11003: Strong Validation Error: The sequence property of a Location is OPTIONAL. If present, it MUST contain the URI of a Sequence referenced by the ComponentDefinition containing the Location. Reference: SBOL Version 2.3.0 Section 7.7.5 on page 36 : https://synbiohub.org/public/igem/pSB1C3/annotation2119048/range2119048

If I read the document in and check, however, I find that this is not the case:

> dx = sbol2.Document()
> dx.read('foo.xml')
> x = dx.find('https://synbiohub.org/public/igem/pSB1C3/annotation2119048/range2119048')
> y = dx.find('https://synbiohub.org/public/igem/pSB1C3')
> x.sequence
'https://synbiohub.org/public/igem/pSB1C3_sequence'
> y.sequences
['https://synbiohub.org/public/igem/pSB1C3_sequence']
> y.sequences[0] == x.sequence
True
jakebeal commented 2 years ago

Workaround for this bug: remove all sequence references in locations.