matthiaskoenig / cy3sbml

cy3sbml: SBML for Cytoscape 3
GNU Lesser General Public License v3.0
13 stars 2 forks source link

unable to import zebrafish metabolic model in xml into Cytoscape #320

Open MafGal opened 3 years ago

MafGal commented 3 years ago

Dear Matthias,

I got the zebrafish metabolic model from Leonie van Steijn and Roeland Merks at Uni Leiden. The original publication is https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6822484 The original publication model in xml is in Supp_Data.zip

However, this file fails to be loaded in Cytoscape 3.8.2 with a cy3sbml error. This original file also fails the online SBML validator.

I then contacted the authors who have been really kind to share an updated xml file, which passes the SBML validator with warnings.

Still, when I try to import it to Cytoscape, I get the same cy3smbl error (instrcting to post an issue here). I am attaching this updated xml file here.

Could you suggest something I can try to solve this? Any ideas what the issue might be and how to solve it?

Many thanks in advance, Mafalda.

zebragem_2_0_updated_20200228.xml.zip

matthiaskoenig commented 3 years ago

@MafGal Yes, the file is valid, but there seem to some issues with the annotations which make the JSBML parser fail. The underlying error is

java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 575; The element type "link" must be terminated by the matching end-tag "</link>".

This comes from some parts of the annotations:

at org.sbml.jsbml.xml.parsers.SBMLRDFAnnotationParser.readRDFURIs(SBMLRDFAnnotationParser.java:991)
    at org.sbml.jsbml.xml.parsers.SBMLRDFAnnotationParser.readSBMLRDF(SBMLRDFAnnotationParser.java:490)
    at org.sbml.jsbml.xml.parsers.SBMLRDFAnnotationParser.processAnnotation(SBMLRDFAnnotationParser.java:115)
    at org.sbml.jsbml.xml.stax.SBMLReader.readXMLFromXMLEventReader(SBMLReader.java:851)
    at org.sbml.jsbml.xml.stax.SBMLReader.readXMLFromStream(SBMLReader.java:592)
    at org.sbml.jsbml.xml.stax.SBMLReader.readSBMLFromString(SBMLReader.java:904)
    at org.sbml.jsbml.xml.stax.SBMLReader.readSBMLFromString(SBMLReader.java:918)
    at org.sbml.jsbml.SBMLReader.readSBMLFromString(SBMLReader.java:264)
    at org.sbml.jsbml.SBMLReader.read(SBMLReader.java:140)
    at org.sbml.jsbml.JSBML.readSBMLFromString(JSBML.java:425)
    at org.cy3sbml.SBMLReaderTask.run(SBMLReaderTask.java:273)

I will test this with the latest version of JSBML and open an issue on the JSBML page for this. Sorry for the inconvenience.

MafGal commented 3 years ago

Thanks a lot Matthias! @matthiaskoenig