Question: Picard MergeBamAlignment failure
0
gravatar for dec986
2.8 years ago by
dec986200
United States
dec986200 wrote:

Hello,

I'm trying to go through the drop-seq pipeline, but unfortunately I'm stuck on a seemingly insurmountable technical issue:

I enter this command to merge BAM files:

[Mon Mar 06 13:23:14 EST 2017] picard.sam.MergeBamAlignment UNMAPPED_BAM=./unaligned_mc_tagged_polyA_filtered.bam ALIGNED_BAM=[./aligned.sorted.bam] OUTPUT=./merged.bam REFERENCE_SEQUENCE=/home/con/Alex/mm10/mm10.fasta PAIRED_RUN=false INCLUDE_SECONDARY_ALIGNMENTS=false    CLIP_ADAPTERS=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false MAX_INSERTIONS_OR_DELETIONS=1 READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate PRIMARY_ALIGNMENT_STRATEGY=BestMapq CLIP_OVERLAPPING_READS=true ADD_MATE_CIGAR=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json

which generates the output:

[Mon Mar 06 13:23:14 EST 2017] Executing as con@gen on Linux 3.16.0-77-generic amd64; OpenJDK 64-Bit Server VM 1.7.0_121-b00; Picard version: 1.138(89618e408692ff6288c7c880658f32f16fcbec53_1441135673) IntelDeflater
INFO    2017-03-06 13:23:14 SamAlignmentMerger  [./aligned.sorted.bam]
[Mon Mar 06 13:23:14 EST 2017] picard.sam.MergeBamAlignment done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=2022703104
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:631)
    at picard.sam.AbstractAlignmentMerger.createNewCigarsIfMapsOffEndOfReference(AbstractAlignmentMerger.java:654)
    at picard.sam.AbstractAlignmentMerger.updateCigarForTrimmedOrClippedBases(AbstractAlignmentMerger.java:686)
    at picard.sam.AbstractAlignmentMerger.transferAlignmentInfoToFragment(AbstractAlignmentMerger.java:514)
    at picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:410)
    at picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:138)
    at picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:248)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:206)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

I asked this question GATK, but couldn't find a solution, and neither could the Drop-Seq group. I don't even understand what the underlying issue is.

As an aside, I've tried the latest version, but I get errors like this:

 Unsupported major.minor version 52.0
drop-seq picard • 1.2k views
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by dec986200
0
gravatar for Pierre Lindenbaum
2.8 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

Unsupported major.minor version 52.0

Your version of java is out of date; java 8 is required.

If you're able to run your picard with a non-java8 then you're using a very old version of picard. Update picard. Current version is 2.9 : https://github.com/broadinstitute/picard/releases

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by Pierre Lindenbaum124k
0
gravatar for dec986
2.8 years ago by
dec986200
United States
dec986200 wrote:

Hi Pierre,

thanks, but I get another error with a message I don't see how to solve.

   con@e:~/Alex2/DS3-1-43468516$ java -jar ../picard.jar MergeBamAlignment UNMAPPED_BAM=./unaligned_mc_tagged_polyA_filtered.bam ALIGNED_BAM=./aligned.sorted.bam OUTPUT=./merged.bam REFERENCE_SEQUENCE=/home/con/Alex/mm10/mm10.fasta PAIRED_RUN=false INCLUDE_SECONDARY_ALIGNMENTS=false    CLIP_ADAPTERS=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false MAX_INSERTIONS_OR_DELETIONS=1 READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate PRIMARY_ALIGNMENT_STRATEGY=BestMapq CLIP_OVERLAPPING_READS=true ADD_MATE_CIGAR=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
    [Tue Mar 07 09:12:12 EST 2017] picard.sam.MergeBamAlignment UNMAPPED_BAM=./unaligned_mc_tagged_polyA_filtered.bam ALIGNED_BAM=[./aligned.sorted.bam] OUTPUT=./merged.bam REFERENCE_SEQUENCE=/home/con/Alex/mm10/mm10.fasta PAIRED_RUN=false CLIP_ADAPTERS=true IS_BISULFITE_SEQUENCE=false ALIGNED_READS_ONLY=false MAX_INSERTIONS_OR_DELETIONS=1 READ1_TRIM=0 READ2_TRIM=0 ALIGNER_PROPER_PAIR_FLAGS=false SORT_ORDER=coordinate PRIMARY_ALIGNMENT_STRATEGY=BestMapq CLIP_OVERLAPPING_READS=true INCLUDE_SECONDARY_ALIGNMENTS=false ADD_MATE_CIGAR=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json    ATTRIBUTES_TO_REVERSE=[OQ, U2] ATTRIBUTES_TO_REVERSE_COMPLEMENT=[E2, SQ] UNMAP_CONTAMINANT_READS=false MIN_UNCLIPPED_BASES=32 MATCHING_DICTIONARY_TAGS=[M5, LN] UNMAPPED_READ_STRATEGY=DO_NOT_CHANGE
    [Tue Mar 07 09:12:12 EST 2017] Executing as con@e on Linux 4.4.0-65-generic amd64; OpenJDK 64-Bit Server VM 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13; Picard version: 2.9.0-1-gf5b9f50-SNAPSHOT
    INFO    2017-03-07 09:12:12 SamAlignmentMerger  Processing SAM file(s): [./aligned.sorted.bam]
    [Tue Mar 07 09:12:12 EST 2017] picard.sam.MergeBamAlignment done. Elapsed time: 0.01 minutes.
    Runtime.totalMemory()=124780544
    To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
    Exception in thread "main" java.lang.IllegalArgumentException: Do not use this function to merge dictionaries with different sequences in them. Sequences must be in the same order as well. Found [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9, CHR_MG117_PATCH, CHR_MG132_PATCH, CHR_MG153_PATCH, CHR_MG184_PATCH, CHR_MG3231_PATCH, CHR_MG3561_PATCH, CHR_MG3562_PATCH, CHR_MG3609_PATCH, CHR_MG3829_PATCH, CHR_MG3833_PATCH, CHR_MG3835_PATCH, CHR_MG4136_PATCH, CHR_MG4151_PATCH, CHR_MG4180_PATCH, CHR_MG4209_PATCH, CHR_MG4211_PATCH, CHR_MG4212_PATCH, CHR_MG4213_PATCH, CHR_MG4214_PATCH, CHR_MG4222_MG3908_PATCH, CHR_MG4248_PATCH, CHR_MG4249_PATCH, CHR_MG4254_PATCH, CHR_MG4255_PATCH, CHR_MG4259_PATCH, CHR_MG4261_PATCH, CHR_MG4264_PATCH, CHR_MG4265_PATCH, CHR_MG4266_PATCH, CHR_MMCHR1_CHORI29_IDD5_1, MT, X, Y, JH584299.1, ...
...abbreviated for character limit...
Un_GL456239, Un_GL456359, Un_GL456360, Un_GL456366, Un_GL456367, Un_GL456368, Un_GL456370, Un_GL456372, Un_GL456378, Un_GL456379, Un_GL456381, Un_GL456382, Un_GL456383, Un_GL456385, Un_GL456387, Un_GL456389, Un_GL456390, Un_GL456392, Un_GL456393, Un_GL456394, Un_GL456396, Un_JH584304, X, X_GL456233_random, Y, Y_JH584300_random, Y_JH584301_random, Y_JH584302_random, Y_JH584303_random].
        at htsjdk.samtools.SAMSequenceDictionary.mergeDictionaries(SAMSequenceDictionary.java:305)
        at picard.sam.SamAlignmentMerger.getDictionaryForMergedBam(SamAlignmentMerger.java:197)
        at picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:346)
        at picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:181)
        at picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:282)
        at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205)
        at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94)
        at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)

Perhaps there is another alternative to Picard's MergeBamAlignment?

ADD COMMENTlink written 2.8 years ago by dec986200

The mesage is clear:

Do not use this function to merge dictionaries with different sequences in them. Sequences must be in the same order as well. Found [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9, CHR_MG117_PATCH, CHR_MG132_PATCH, CHR_MG153_PATCH, CHR_MG184_PATCH, CHR_MG3231_PATCH, CHR_MG3561_PATCH, CHR_MG3562_PATCH, CHR_MG3609_PATCH, CHR_MG3829_PATCH, CHR_MG3833_PATCH, CHR_MG3835_PATCH, CHR_MG4136_PATCH, CHR_MG4151_PATCH, CHR_MG4180_PATCH, CHR_MG4209_PATCH, CHR_MG4211_PATCH, CHR_MG4212_PATCH, CHR_MG4213_PATCH, CHR_MG4214_PATCH, CHR_MG4222_MG3908_PATCH, CHR_MG4248_PATCH, CHR_MG4249_PATCH, CHR_MG4254_PATCH, CHR_MG4255_PATCH, CHR_MG4259_PATCH, CHR_MG4261_PATCH, CHR_MG4264_PATCH, CHR_MG4265_PATCH, CHR_MG4266_PATCH, CHR_MMCHR1_CHORI29_IDD5_1, MT, X, Y, JH584299.1, ...

ADD REPLYlink written 2.8 years ago by Pierre Lindenbaum124k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1232 users visited in the last hour