bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
994 stars 354 forks source link

Allow overriding Java binary in resources #1492

Closed lbeltrame closed 8 years ago

lbeltrame commented 8 years ago

As MuTect 1 is not compatible with Java 8 (throws a lot of errors) I'd like to point the pipeline to a Java 7 version (the one installed systemwide). Setting

resources:
    java:
        bin: /usr/bin/java

Has no effect, because the pipeline calls java directly, hence the first one picked up in PATH "wins".

chapmanb commented 8 years ago

Luca; bcbio now comes with Java 8 installed via conda and will use it for all Java tools that support it, including GATK 3.6 and MuTect2. You don't need Java installed externally except for 7 only tools: MuTect and GATK < 3.6. So the solution here is to only load Java 7 in your PATH before running bcbio if you need it, and it shouldn't need extra configuration. My worry about configuring it is that it makes it confusing when debugging issues so trying to keep things as simple as possible. Hope this will work for you.

lbeltrame commented 8 years ago

A simpler alternative: do you store the installed Java version somewhere? Would it be better to have MuTect 1 jobs abort if there's an incompatible Java version found? The errors are very cryptic, and a proper error would help.

I would consider this akin to the "bad versions check" done in the case of VarScan and MuTect itself.

chapmanb commented 8 years ago

Luca -- thanks for the idea. I added an initial check to require external Java 1.7 if a pipeline needs MuTect or GATK < 3.6. This should error out initially and provide a useful sanity check. Thanks again for the suggestion.