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.

Question for running the tutorial "Map and clean up short read sequence data efficiently"

ArvinWuArvinWu Las Vegas, NVMember

hello everyone.

I run the 3.C example of tutorial "Map and clean up short read sequence data efficiently"
I get a error message. How can I solve this problem?
the command I input is
java -Xmx3G -jar picard/picard.jar MergeBamAlignment R=Homo_sapiens_assembly19.fasta UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=6483_snippet_bwa_mem1.sam O=6483_snippet_mergebamalignment.bam CREATE_INDEX=true ADD_MATE_CIGAR=true CLIP_ADAPTERS=false CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true MAX_INSERTIONS_OR_DELETIONS=-1 PRIMARY_ALIGNMENT_STRATEGY=MostDistant ATTRIBUTES_TO_RETAIN=XS TMP_DIR=/tmp/arvin

However, I got the message

[Mon Apr 25 13:41:34 PDT 2016] picard.sam.MergeBamAlignment UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=[6483_snippet_bwa_mem1.sam] OUTPUT=6483_snippet_mergebamalignment.bam REFERENCE_SEQUENCE=Homo_sapiens_assembly19.fasta CLIP_ADAPTERS=false MAX_INSERTIONS_OR_DELETIONS=-1 ATTRIBUTES_TO_RETAIN=[XS] PRIMARY_ALIGNMENT_STRATEGY=MostDistant CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true ADD_MATE_CIGAR=true TMP_DIR=[/tmp/arvin] CREATE_INDEX=true PAIRED_RUN=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate UNMAP_CONTAMINANT_READS=false MIN_UNCLIPPED_BASES=32 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Mon Apr 25 13:41:34 PDT 2016] Executing as [email protected] on Linux 4.2.0-35-generic amd64; OpenJDK 64-Bit Server VM 1.7.0_95-b00; Picard version: 1.141(8ece590411350163e7689e9e77aab8efcb622170_1447695087) IntelDeflater
INFO 2016-04-25 13:41:34 SamAlignmentMerger [6483_snippet_bwa_mem1.sam]
[Mon Apr 25 13:41:35 PDT 2016] picard.sam.MergeBamAlignment done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=62717952
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.NullPointerException
at picard.sam.AbstractAlignmentMerger.createNewCigarIfMapsOffEndOfReference(AbstractAlignmentMerger.java:665)
at picard.sam.AbstractAlignmentMerger.createNewCigarsIfMapsOffEndOfReference(AbstractAlignmentMerger.java:688)
at picard.sam.AbstractAlignmentMerger.updateCigarForTrimmedOrClippedBases(AbstractAlignmentMerger.java:720)
at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToFragment(AbstractAlignmentMerger.java:538)
at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToPairedRead(AbstractAlignmentMerger.java:567)
at picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:390)
at picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:149)
at picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:256)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

Is anything I missed?

Issue · Github
by Sheila

Issue Number
841
State
closed
Last Updated
Assignee
Array
Milestone
Array
Closed By
sooheelee

Best Answer

Answers

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭
    edited April 2016

    Hi @ArvinWu

    I just tested your command using the provided tutorial files, Picard v1.141 and Java v1.7 and this ran fine. I noticed that you using your own alignment file 6483_snippet_bwa_mem1.sam. Would you mind running the command again using the provided 6483_snippet_bwa_mem.sam? It's available in tutorial_6483_intermediate_files.tar.gz, the optional tutorial file bundle.

    If this works, then we can hash out what is different about your alignment from the tutorial's alignment. If it errors, I'm going to ask you to download the latest version of Picard, which requires Java v1.8, and rerun the command using this latest version. At this point I can look into the code and ask our engineers what may be the problem. Either way, please let us know how it goes.

    Soo Hee

  • ArvinWuArvinWu Las Vegas, NVMember

    Both ways return error message.

    here are the results

    [email protected]:~/GATK$ java -Xmx3G -jar picard-tools-2.2.4/picard.jar MergeBamAlignment R=Homo_sapiens_assembly19.fasta UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=6483_snippet_bwa_mem.sam O=6483_snippet_mergebamalignment.bam CREATE_INDEX=true ADD_MATE_CIGAR=true CLIP_ADAPTERS=false CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true MAX_INSERTIONS_OR_DELETIONS=-1 PRIMARY_ALIGNMENT_STRATEGY=MostDistant ATTRIBUTES_TO_RETAIN=XS TMP_DIR=/tmp/arvin
    [Fri Apr 29 14:53:52 PDT 2016] picard.sam.MergeBamAlignment UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=[6483_snippet_bwa_mem.sam] OUTPUT=6483_snippet_mergebamalignment.bam REFERENCE_SEQUENCE=Homo_sapiens_assembly19.fasta CLIP_ADAPTERS=false MAX_INSERTIONS_OR_DELETIONS=-1 ATTRIBUTES_TO_RETAIN=[XS] PRIMARY_ALIGNMENT_STRATEGY=MostDistant CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true ADD_MATE_CIGAR=true TMP_DIR=[/tmp/arvin] CREATE_INDEX=true PAIRED_RUN=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate UNMAP_CONTAMINANT_READS=false MIN_UNCLIPPED_BASES=32 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
    [Fri Apr 29 14:53:52 PDT 2016] Executing as [email protected] on Linux 4.2.0-35-generic amd64; OpenJDK 64-Bit Server VM 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14; Picard version: 2.2.4(920e3247c340720b009f2398c1b93cce132c9bed_1461793281) IntelDeflater
    INFO 2016-04-29 14:53:52 SamAlignmentMerger [6483_snippet_bwa_mem.sam]
    [Fri Apr 29 14:53:52 PDT 2016] picard.sam.MergeBamAlignment done. Elapsed time: 0.01 minutes.
    Runtime.totalMemory()=62849024
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
    Exception in thread "main" java.lang.NullPointerException
    at picard.sam.AbstractAlignmentMerger.createNewCigarIfMapsOffEndOfReference(AbstractAlignmentMerger.java:678)
    at picard.sam.AbstractAlignmentMerger.createNewCigarsIfMapsOffEndOfReference(AbstractAlignmentMerger.java:701)
    at picard.sam.AbstractAlignmentMerger.updateCigarForTrimmedOrClippedBases(AbstractAlignmentMerger.java:733)
    at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToFragment(AbstractAlignmentMerger.java:551)
    at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToPairedRead(AbstractAlignmentMerger.java:580)
    at picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:390)
    at picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:152)
    at picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:266)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

  • ArvinWuArvinWu Las Vegas, NVMember

    I also use the file that you gave, but I got the same error message

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    @ArvinWu, someone pointed out to me you're using OpenJDK. It's too bad these command don't run on OpenJDK. Unfortunately, we only support use of OracleJDK. If you're still having problems running the commands using OracleJDK, please let us know.

  • ArvinWuArvinWu Las Vegas, NVMember

    When I change to Oracle JDK 1.8.0_91, the problem is still occurred.

    [email protected]:~/GATK$ java -Xmx3G -jar picard-tools-2.2.4/picard.jar MergeBamAlignment R=Homo_sapiens_assembly19.fasta UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=6483_snippet_bwa_mem.sam O=6483_snippet_mergebamalignment.bam CREATE_INDEX=true ADD_MATE_CIGAR=true CLIP_ADAPTERS=false CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true MAX_INSERTIONS_OR_DELETIONS=-1 PRIMARY_ALIGNMENT_STRATEGY=MostDistant ATTRIBUTES_TO_RETAIN=XS TMP_DIR=/tmp/arvin [Mon May 02 09:30:59 PDT 2016] picard.sam.MergeBamAlignment UNMAPPED_BAM=6483_snippet_revertsam.bam ALIGNED_BAM=[6483_snippet_bwa_mem.sam] OUTPUT=6483_snippet_mergebamalignment.bam REFERENCE_SEQUENCE=Homo_sapiens_assembly19.fasta CLIP_ADAPTERS=false MAX_INSERTIONS_OR_DELETIONS=-1 ATTRIBUTES_TO_RETAIN=[XS] PRIMARY_ALIGNMENT_STRATEGY=MostDistant CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=true ADD_MATE_CIGAR=true TMP_DIR=[/tmp/arvin] CREATE_INDEX=true PAIRED_RUN=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate UNMAP_CONTAMINANT_READS=false MIN_UNCLIPPED_BASES=32 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
    [Mon May 02 09:30:59 PDT 2016] Executing as [email protected] on Linux 4.2.0-35-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: 2.2.4(920e3247c340720b009f2398c1b93cce132c9bed_1461793281) IntelDeflater
    INFO 2016-05-02 09:30:59 SamAlignmentMerger [6483_snippet_bwa_mem.sam]
    [Mon May 02 09:30:59 PDT 2016] picard.sam.MergeBamAlignment done. Elapsed time: 0.01 minutes.
    Runtime.totalMemory()=62849024
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
    Exception in thread "main" java.lang.NullPointerException
    at picard.sam.AbstractAlignmentMerger.createNewCigarIfMapsOffEndOfReference(AbstractAlignmentMerger.java:678)
    at picard.sam.AbstractAlignmentMerger.createNewCigarsIfMapsOffEndOfReference(AbstractAlignmentMerger.java:701)
    at picard.sam.AbstractAlignmentMerger.updateCigarForTrimmedOrClippedBases(AbstractAlignmentMerger.java:733)
    at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToFragment(AbstractAlignmentMerger.java:551)
    at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToPairedRead(AbstractAlignmentMerger.java:580)
    at picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:390)
    at picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:152)
    at picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:266)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

  • ArvinWuArvinWu Las Vegas, NVMember

    yes, the problem is the reference.
    Thanks for your reply.
    And sorry to bother you so many times.

  • shleeshlee CambridgeMember, Broadie ✭✭✭✭✭

    Great, my pleasure.

Sign In or Register to comment.