ssadedin / ximmer

Ximmer is a system for CNV calling on exome and targeted genomic sequencing
http://ssadedin.github.io/ximmer/
GNU Lesser General Public License v2.1
19 stars 10 forks source link

Failed analysis due to problems with finding JAVA_home #14

Closed bopohdr closed 5 years ago

bopohdr commented 6 years ago

I am having similar/same problem on mac as described previously in : https://github.com/ssadedin/ximmer/issues/11

Running with : docker run

-e XIMMER_REF=/reference/hg38.fa 
-v /Users/dmitrijsrots/Downloads/NGS_Afib/reference:/reference 
-v /Users/dmitrijsrots/Downloads/NGS_Afib/data:/data 
ximmer ximmer 
-c /data/config.groovy 
-o /data/output.docker

fails with: `

====================================================================================================
|                              Starting Pipeline at 2018-09-30 15:34                               |
====================================================================================================

============================================ Stage init ============================================

================================== Stage create_analysable_target ==================================
groovy: JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME.
ERROR: stage create_analysable_target failed: Command in stage create_analysable_target failed with exit status = 1 : 

unset JAVA_HOME; export PATH="/data/output.docker/bin:$PATH";
unset GROOVY_HOME`

I have tried to set JAVA_HOME path in the dockerfile (as stated in docker recommendation for ENV). As well as tried to make path and move JAVA_HOME to place, which is stated in dockerfile: ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre" I also tried with deleted dockerfile in ximmer folder.

Maybe ximmer is not referring to the dockerfile ????

The problem occuring in mac OS and in Windows 10 using build in terminals or docker's CLI.

MarWoes commented 6 years ago

I had the same issue running Docker on Debian 4.9. The problem seems to be the missing javac executable since only JRE seems to be installed. A simple fix would be to install the openjdk-8-jdk package which can be done when starting the container using something like this:

docker run 
  -e XIMMER_REF=/genomes/Homo_sapiens.GRCh37.67/Homo_sapiens.GRCh37.67.dna.chromosome.all.fasta 
...
  ximmer /bin/bash -c "apt install -y openjdk-8-jdk && ximmer -c /data/cnv/ximmer/config.groovy -v -o /data/cnv/ximmer/run"

Adding the openjdk-8-jdk package to the Dockerfile should also resolve this issue.

ssadedin commented 6 years ago

Apologies for taking so long to address this. Agreed adding openjdk8 probably fixes it - but in fact javac itself should not be necessary as such, the problem is just that it looks for javac as a way to determine JAVA_HOME, so if we avoid it being unset in the first place then that isn't necessary. So the fix addresses that problem.