SynBioDex / pySBOL

SWIG-Python wrappers implementing SBOL 2.2
Apache License 2.0
25 stars 8 forks source link

JVM OOM when trying to parse GenBank file #118

Closed ifiddes closed 2 years ago

ifiddes commented 4 years ago

I wanted to test parsing of a standard E. coli GenBank file. I get an OOM error when I do so:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-3acf81205467> in <module>
----> 1 doc.importFromFormat('GenBank', '/Users/ian.fiddes/Downloads/Inscripta_BL21.gb')

~/miniconda3/envs/smash/lib/python3.7/site-packages/sbol/libsbol.py in importFromFormat(self, language, input_path)
  15320 
  15321     def importFromFormat(self, language, input_path):
> 15322         return _libsbol.Document_importFromFormat(self, language, input_path)
  15323 
  15324     def copy(self, *args):

ValueError: Invalid. Converting GenBank to SBOL Version 2
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:57)
    at java.nio.CharBuffer.allocate(CharBuffer.java:335)
    at java.util.Scanner.makeSpace(Scanner.java:840)
    at java.util.Scanner.readInput(Scanner.java:795)
    at java.util.Scanner.next(Scanner.java:1369)
    at org.sbolstandard.core2.SBOLReader.read(SBOLReader.java:661)
    at org.sbolstandard.core2.SBOLReader.read(SBOLReader.java:625)
    at org.sbolstandard.core2.SBOLReader.read(SBOLReader.java:512)
    at org.sbolstandard.core2.SBOLReader.read(SBOLReader.java:437)
    at org.sbolstandard.core2.SBOLReader.read(SBOLReader.java:422)
    at org.sbolstandard.core2.SBOLValidate.validate(SBOLValidate.java:2726)
    at org.sbolstandard.core2.SBOLValidate.main(SBOLValidate.java:3028)

How can I give the JVM more memory?

bbartley commented 4 years ago

@ifiddes it seems like this error might be coming from the external conversion service located at https://validator.sbolstandard.org/. (PySBOL calls this external service to perform the conversion.) What happens when you submit your job through using the web interface? Can you reproduce the same error?

It could also be that your GenBank file has some idiosyncrasies that the converter does not like. This is always a possibility, because GenBank files are not well standardized, so try as we might, we are constantly discovering different dialects of GenBank that break our parsers.

jakebeal commented 2 years ago

Seeing no response to the questions, I am assuming that @ifiddes resolved this issue via the validator directly.