Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

Instalation - Picard

tmvtmv brazilMember
edited December 2015 in Ask the GATK team

Hi all,

I have downloaded Picard and htsjdk from gitgub as indicated in the documentation. However, when I go to the Picard root and type "ant", I get the following error:

compile-samtools:
[javac] picard/build.xml:537: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 407 source files to picard/htsjdk/classes
[javac] javac: invalid target release: 1.8
[javac] Usage: javac

[javac] use -help for a list of possible options

BUILD FAILED
picard/build.xml:139: The following error occurred while executing this line:
picard/htsjdk/build.xml:96: The following error occurred while executing this line:
picard/build.xml:537: Compile failed; see the compiler error output for details.

I have tried to edit the JAVA6_HOME with /usr/lib/jvm/java-7-openjdk-amd64/lib/ and /usr/lib/jvm/java-6-openjdk-amd64/lib/. The same error persists.

Any help is appreciated.
Best regards,
Thiago

Issue · Github
by Sheila

Issue Number
406
State
closed
Last Updated
Milestone
Array
Closed By
chandrans

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @tmv
    Hi Thiago,

    What version do you see when you type java -version? The latest version of Picard uses Java-1.8. You can invoke 1.8 by using a command like this:

    /usr/libexec/java_home -v 1.8.0_60 --exec java -jar Picard.jar...

    So, you will first give the location of the Java home, then use -v to specify the Java version to use. --exec tells the terminal to use the previously specified Java version to execute the command.

    There will be documentation on this soon.

    -Sheila

  • kmmahankmmahan Member

    I have Picard 2.18.14 and it's still giving me this error.

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @kmmahan

    Would you please specify the command you are using and please list here the error you see.

    Thank you.

    Regards
    Bhanu Gandham

  • kmmahankmmahan Member

    Error Type Count
    ERROR:INVALID_VERSION_NUMBER 1

    [Sat Sep 29 16:19:29 PDT 2018] picard.sam.ValidateSamFile done. Elapsed time: 33.16 minutes.
    Runtime.totalMemory()=598212608
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp

    Although I have proceeded with HaplotypeCaller and VariantFiltration and so far have not had any issues.

  • kmmahankmmahan Member

    picard ValidateSamFile INPUT=KMM1_bwamem_alignment_samblaster_samtoolsview_samtoolssort_09282018.bam MODE=SUMMARY

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @kmmahan

    It looks like maybe there are some incompatible tool versions. Would you please run 'samtools view -H' on the bam file and send us the output.

    Thank you
    -Bhanu

  • kmmahankmmahan Member

    @HD VN:1.6 SO:coordinate

    It does not like the version number

  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @kmmahan

    htsjdk does not support sam version 1.6. The acceptable versions are: 1.0, 1.3, 1.4, 1.5. This is why you see the error.

    I hope this helps explain the reason for your error.

    Regards
    Bhanu

  • LouisBLouisB Broad InstituteMember, Broadie, Dev ✭✭

    A clarification and update: GATK and Picard support the major new feature in bam 1.6, which is support for very long cigar strings ( something useful for oxford nanopore sequencing.)

    There are a few niche features that are not supported yet, (0-length binary arrays, and emoji / unicode characters in description fields.) but for the most part there shouldn't be any problem running 1.6 bams through gatk and picard .

    We're updating htsjdk which is the underlying library that picard and GATK depend on to support the new features. Once that is done ValidateSam should no longer complain about 1.6.

  • manolismanolis Member ✭✭
    edited March 15

    Hi, I have the same problem...

    picard-2.17.3

    openjdk version "1.8.0_152-release"
    OpenJDK Runtime Environment (build 1.8.0_152-release-1056-b12)
    OpenJDK 64-Bit Server VM (build 25.152-b12, mixed mode)
    

    GATK Pre-processing, BAM file pre-BQSR

    All upstream steps where done with GATK4.0.11.0. However my pipeline for those steps does not require GATK tools.

    java -jar /share/apps/bio/picard-2.17.3/picard.jar ValidateSamFile I=mWES_9_fixed.bam MODE=SUMMARY TMP_DIR=/home/manolis/GATK4/tmp

    @HD VN:1.5 SO:coordinate

    No errors found

    GATK Pre-processing, BAM file post-BQSR, GATK 4.1.0.0

    java -jar /share/apps/bio/picard-2.17.3/picard.jar ValidateSamFile I=mWES_9_bqsr.bam MODE=SUMMARY TMP_DIR=/home/manolis/GATK4/tmp

    ## HISTOGRAM    java.lang.String
    Error Type  Count
    ERROR:INVALID_VERSION_NUMBER    1
    

    @HD VN:1.6 SO:coordinate

    If I'm correct I have to delete all post-BQSR bam files and rerun the BQSR steps with GATK 4.0.11.0 (considering that was an ERROR message during Validation), correct?

    If the problem is inside the following comment... it was fixed?

    We're updating htsjdk which is the underlying library that picard and GATK depend on to support the new features. Once that is done ValidateSam should no longer complain about 1.6.

    Or I have just to update to the last picard version 2.18.27?

    Many thanks

    Post edited by manolis on
  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @manolis

    In my opinion updating to the last picard version 2.18.27 should resolve this issue, as the latest versions of picard support bam 1.6

  • manolismanolis Member ✭✭

    Hi @bhanuGandham

    Yes, with this update now is everything ok! Thanks

Sign In or Register to comment.