draeger-lab / EscherConverter

A standalone program that reads files created with the graphical network editor Escher and converts them to files in community standard formats.
https://draeger-lab.github.io/EscherConverter/
MIT License
15 stars 10 forks source link

Conversion from JSON to SBML stays at Reading input file #52

Open MariaHei opened 5 years ago

MariaHei commented 5 years ago

Converting some json files to SBML leads to the conversion getting stuck at reading input file in the gui or to a NullPointerException in the command line: java -jar -Xms8G -Xmx8G -Duser.language=en EscherConverter-1.2.1.jar --input=e_coli_core.escher.json --format=SBML --output=ecoli.sbml --gui=false

Exception in thread "main" java.lang.NullPointerException
        at com.fasterxml.jackson.databind.ObjectMapper.treeToValue(ObjectMapper.java:1899)
        at edu.ucsd.sbrg.escher.EscherConverter.parseEscherJson(EscherConverter.java:232)
        at edu.ucsd.sbrg.escher.EscherConverter.parseEscherJson(EscherConverter.java:208)
        at edu.ucsd.sbrg.escher.EscherConverter.convert(EscherConverter.java:195)
        at edu.ucsd.sbrg.escher.EscherConverter.convert(EscherConverter.java:450)
        at edu.ucsd.sbrg.escher.EscherConverter.batchProcess(EscherConverter.java:327)
        at edu.ucsd.sbrg.escher.EscherConverter.commandLineMode(EscherConverter.java:384)
        at de.zbit.Launcher.launchCommandLineMode(Launcher.java:725)
        at de.zbit.Launcher.run(Launcher.java:862)
        at de.zbit.Launcher.<init>(Launcher.java:211)
        at edu.ucsd.sbrg.escher.EscherConverter.<init>(EscherConverter.java:263)
        at edu.ucsd.sbrg.escher.EscherConverter.main(EscherConverter.java:253)
MariaHei commented 5 years ago

The reason is that in edu.ucsd.sbrg.escher.EscherConverter.parseEscherJson(EscherConverter.java:232) escherJson.get(0) = null and escherJson.get(1) = null

rmtfleming commented 4 years ago

I think I see this issue also, using the 1.2.1 binary. In this example, it seems to not progress beyond reading.

Is it fixed in the new binary?

rfleming@hex1:~/work/sbgCloud/code/fork-cobratoolbox/binary/all$ java -jar -Xms8G -Xmx8G -Duser.language=en /home/rfleming/work/sbgCloud/code/fork-cobratoolbox/binary/all/EscherConverter-1.2.1.jar --input=/home/rfleming/work/sbgCloud/programExperimental/projects/tracerBased/results/iDopaConservedMoieties/fol/iDopa_fol.json --format=SBML --output=/home/rfleming/work/sbgCloud/programExperimental/projects/tracerBased/results/iDopaConservedMoieties/fol/iDopa_fol_SBML_tmp.xml --gui=false

EscherConverter version 1.2.1 Copyright © 2015-2019 University of Tübingen Systems Biology Research Group. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See http://www.opensource.org/licenses/mit-license.php.

05-Nov-2020 00:38:56 de.zbit.Launcher launchCommandLineMode --- INFO: Launching command-line mode of EscherConverter. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter batchProcess --- INFO: AutoDetect: Escher JSON file found 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter convert --- WARNING: Validating document 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter validateInput --- INFO: Validation: Escher JSON Schema version 1.0.0 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter convert --- WARNING: Validation failed 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter convert --- WARNING: Ignoring unsuccessful validation and moving forward 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter parseEscherJson --- INFO: Reading input file /home/rfleming/work/sbgCloud/programExperimental/projects/tracerBased/results/iDopaConservedMoieties/fol/iDopa_fol.json. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '34'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '12'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '26'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '31'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '5'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '5'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '10'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '27'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '15'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '2'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '16'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '0'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '9'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '7'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '44'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '10'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '25'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '44'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '35'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '56'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '12'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '51'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '6'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '29'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '26'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '2'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '28'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '19'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '46'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '38'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '21'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '39'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '32'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '14'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '9'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '28'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '33'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '5'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '32'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '18'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '14'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '60'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '21'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '2'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '35'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '58'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '65'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '15'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '25'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '45'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '6'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '28'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '7'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '61'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '43'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '19'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '51'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '31'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '0'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '1'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.model.EscherCompartment setId --- WARNING: Invalid compartment identifier '3'. 05-Nov-2020 00:38:56 edu.ucsd.sbrg.escher.EscherConverter parseEscherJson --- INFO: Finished reading.

draeger commented 3 years ago

@rmtfleming Would you mind providing an example file (e.g., via direct e-mail)? I'd like to test it and see how to fix it. Also, with your file there seems a problem with compartment identifiers that we could fix automatically.

rmtfleming commented 3 years ago

Examples sent.