Question: SnpEff annotation keeps throwing Java Errors
gravatar for tmrhyd
17 months ago by
tmrhyd0 wrote:

So I keep running the following code.

snpEffBuildAndRun --snpeff-exec /home/treinbo/snpEff/snpEff.jar KMM.gff 6_KMM7_Chloroplast_freebayes_07012019.vcf -o 7_KMM7_chloroplast_annotate.vcf

And it keeps giving me the following error.

Traceback (most recent call last):
  File "/home/treinbo/anaconda3/bin/snpEffBuildAndRun", line 44, in <module>
    args = check_and_amend_executables(args)
  File "/home/treinbo/anaconda3/lib/python3.7/site-packages/snpEffWrapper/", line 79, in check_and_amend_executables
    args.java_exec = _choose_java()
  File "/home/treinbo/anaconda3/lib/python3.7/site-packages/snpEffWrapper/", line 59, in _choose_java
    if _java_version_ok(java):
  File "/home/treinbo/anaconda3/lib/python3.7/site-packages/snpEffWrapper/", line 43, in _java_version_ok
    output = subprocess.check_output([java, '-Xmx10m', '-version'], stderr=subprocess.STDOUT)
  File "/home/treinbo/anaconda3/lib/python3.7/", line 395, in check_output
  File "/home/treinbo/anaconda3/lib/python3.7/", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/treinbo/anaconda3/lib/python3.7/", line 775, in __init__
    restore_signals, start_new_session)
  File "/home/treinbo/anaconda3/lib/python3.7/", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/software/bin/java': '/software/bin/java'

Java is installed, and I've typed Java into terminal and got results, so it definitely is working, so why is it trying to find a version of java that doesn't exist?

Thank you guys so much!!

snp assembly genome • 392 views
ADD COMMENTlink written 17 months ago by tmrhyd0

What is the result of which java? And echo $JAVA_HOME?

ADD REPLYlink written 17 months ago by h.mon31k
gravatar for Arup Ghosh
16 months ago by
Arup Ghosh2.7k
Arup Ghosh2.7k wrote:

Set the path of Java installation using --java-exec option.

ADD COMMENTlink written 16 months ago by Arup Ghosh2.7k

That worked! thank you!!

ADD REPLYlink written 16 months ago by tmrhyd0

If the answer solved your problem, then please up-vote it and toggle the accepted flag.

ADD REPLYlink written 16 months ago by h.mon31k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1510 users visited in the last hour