daveuu / baga

Bacterial and Archaeal Genome Analyser
GNU General Public License v3.0
9 stars 2 forks source link

GATK and java version trouble #10

Open rafarios50 opened 7 years ago

rafarios50 commented 7 years ago

Greetings, I have installed baga and everythin has worked well until I get to the indel realignment step where it need GATK to do it. I have got GATK version 3.6-0-g89b7209 which works on java 1.8.

[rrios@BUSRVGENOMICA baga]$ java -jar /usr/bin/GenomeAnalysisTK.jar -version 3.6-0-g89b7209

I executed it like these :

[rrios@BUSRVGENOMICA baga]$ /source_installers/baga/baga_cli.py AlignReads -n TX6128 -g contig_139 --indelrealign --GATK_jar_path /usr/bin/GenomeAnalysisTK.jar and the output was: Using system JAVA JRE GATK v3.3 requires Java v1.7 but your version is 1.8. Please install Java v1.7 to continue or use --JRE_1_7_path to specify Java v1.7 binary to use.

Then I tried with java 1.7:

/source_installers/baga/baga_cli.py AlignReads -n TX6128 -g contig_139 --indelrealign --GATK_jar_path /usr/bin/GenomeAnalysisTK.jar --JRE_1_7_path /source_installers/jre1.7.0_80/bin/java and the output: Using provided JAVA JRE at /source_installers/jre1.7.0_80/bin/java Java 1.7: found! Exception in thread "main" java.lang.UnsupportedClassVersionError: org/broadinstitute/gatk/engine/CommandLineGATK : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

There was a problem checking your --GATK_jar_path argument. Please report this as a baga bug.

Which is the same result when I execute GATK on its own with Java 1.7:

/source_installers/jre1.7.0_80/bin/java -jar /usr/bin/GenomeAnalysisTK.jar -version Exception in thread "main" java.lang.UnsupportedClassVersionError: org/broadinstitute/gatk/engine/CommandLineGATK : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

So, here I am reporting the bug.

For now I'm going to see if I can download a previous version of GATK and work this around.

Thank you

daveuu commented 7 years ago

Hi Rafa,

This is actually fixed in a development branch. Java 1.7 or 1.8 can be used with appropriate GATK versions from 3.3 to 3.6.

To use the other branch it issue the command git checkout dev1 in your cloned baga repository. There are quite a few improvements but unfortunately you'll also need to start your analysis again: crucially, genomes are handled differently internally - multiple replicons (chromosomes and plasmids) are respected (the original release only handled single chromosome genomes).

There are a couple of changes in the commands:

--JRE_1_7_path has changed to --JRE_path and can point to either Java 1.7 or 1.8

I need to update the documentation accordingly . . sorry about that!

Let me know if you have further issues.

daveuu commented 7 years ago

And if a previous baga command seems not to work, try e.g., baga_cli.py CollectData -h to get a description new commands.