Question: Do Parsing Errors cause ASTRAL to quit with a non-zero exit code?
See original GitHub issueSimilar or related to https://github.com/smirarab/ASTRAL/issues/19 or https://github.com/smirarab/ASTRAL/issues/16
When I run ASTRAL-MP and there is a parsing error, e.g.
================== ASTRAL =====================
This is ASTRAL version 5.15.1
Using native AVX batch computing.
Gene trees are treated as unrooted
There are 8 threads used to run.
Exception in thread "main" java.lang.RuntimeException: Failed to Parse Tree number: 1
at phylonet.coalescent.CommandLine.readInputTrees(CommandLine.java:750)
at phylonet.coalescent.CommandLine.readOptions(CommandLine.java:369)
at phylonet.coalescent.CommandLine.main(CommandLine.java:517)
Caused by: phylonet.tree.io.ParseException: ')' expected
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:405)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readNode(NewickReader.java:399)
at phylonet.tree.io.NewickReader.readTree(NewickReader.java:374)
at phylonet.tree.io.NewickReader.readTree(NewickReader.java:95)
at phylonet.coalescent.CommandLine.readInputTrees(CommandLine.java:717)
... 2 more
the process does not seem to fail/exit automatically. This is true for me from the BASH shell (terminal program on Mac OS X), running it via the shell via the !
symbol in an IPython cell in a Jupyter notebook, or calling it via Python’s os.system
function – the process just hangs indefinitely and does not exit by itself.
This is admittedly not a big deal, especially when ASTRAL is being used interactively. It is more inconvenient when ASTRAL is being run multiple times inside of a script (as I am currently doing), because when ASTRAL fails with a parse error the script keeps running indefinitely, and the only tipoff (if I don’t actively monitor the contents of all of the log files piped from STDERR) that something is amiss is that the fans on my laptop don’t start running.
Please let me know whether I should clarify anything because I feel like I did not succeed in describing the situation as clearly as I would have liked
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
ef5518cI was able to reproduce with ASTRAL-MP (5.15.1) but not using normal ASTRAL (5.7.4). I fixed the ASTRAL-MP in version
15.5.2
(ef5518c). Please update to 15.5.2 and it should be fixed. Thanks for the report.On Thu, Dec 10, 2020 at 3:38 PM krinsman notifications@github.com wrote:
– Siavash Mirarab
The third tree in your input file seems to have some error. My guess is that it has non-standard characters. See: https://github.com/smirarab/ASTRAL/#input