MergeBamAlignment Failure

Hello,

I'm trying to use Picard 2.9.0 MergeBamAlignment, but get this error:


Command: $ java -jar /data/murphy/shared_bins/picard-tools-2.9.0/picard.jar MergeBamAlignment REFERENCE_SEQUENCE=/data/murphy/home/skim/Olga/Vera/mm10/mm10.fasta UNMAPPED_BAM=/data/murphy/home/skim/Olga/Vera/unaligned_mc_tagged_polyA_filtered_P5.bam ALIGNED_BAM=/data/murphy/home/skim/Olga/Vera/Aligned.out_P5.sorted.bam OUTPUT=merged_P5.bam INCLUDE_SECONDARY_ALIGNMENTS=false PAIRED_RUN=false
Picked up JAVA_TOOL_OPTIONS: -Xmx16g -Xss2560k
[Wed Nov 22 17:52:01 CET 2017] picard.sam.MergeBamAlignment UNMAPPED_BAM=/data/murphy/home/skim/Olga/Vera/unaligned_mc_tagged_polyA_filtered_P5.bam ALIGNED_BAM=[/data/murphy/home/skim/Olga/Vera/Aligned.out_P5.sorted.bam] OUTPUT=merged_P5.bam REFERENCE_SEQUENCE=/data/murphy/home/skim/Olga/Vera/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 ATTRIBUTES_TO_REVERSE=[OQ, U2] ATTRIBUTES_TO_REVERSE_COMPLEMENT=[E2, SQ] 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 UNMAP_CONTAMINANT_READS=false MIN_UNCLIPPED_BASES=32 MATCHING_DICTIONARY_TAGS=[M5, LN] UNMAPPED_READ_STRATEGY=DO_NOT_CHANGE 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
[Wed Nov 22 17:52:01 CET 2017] Executing as [email protected] on Linux 3.10.0-514.21.2.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_141-b16; Picard version: 2.9.0-1-gf5b9f50-SNAPSHOT
INFO 2017-11-22 17:52:01 SamAlignmentMerger Processing SAM file(s): [/data/murphy/home/skim/Olga/Vera/Aligned.out_P5.sorted.bam]
[Wed Nov 22 17:52:01 CET 2017] picard.sam.MergeBamAlignment done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=2058354688
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 [chr1, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr1_GL456210_random, chr1_GL456211_random, chr1_GL456212_random, chr1_GL456213_random, chr1_GL456221_random, chr2, chr3, chr4, chr4_GL456216_random, chr4_JH584292_random, chr4_GL456350_random, chr4_JH584293_random, chr4_JH584294_random, chr4_JH584295_random, chr5, chr5_JH584296_random, chr5_JH584297_random, chr5_JH584298_random, chr5_GL456354_random, chr5_JH584299_random, chr6, chr7, chr7_GL456219_random, chr8, chr9, chrM, chrX, chrX_GL456233_random, chrY, chrY_JH584300_random, chrY_JH584301_random, chrY_JH584302_random, chrY_JH584303_random, chrUn_GL456239, chrUn_GL456367, chrUn_GL456378, chrUn_GL456381, chrUn_GL456382, chrUn_GL456383, chrUn_GL456385, chrUn_GL456390, chrUn_GL456392, chrUn_GL456393, chrUn_GL456394, chrUn_GL456359, chrUn_GL456360, chrUn_GL456396, chrUn_GL456372, chrUn_GL456387, chrUn_GL456389, chrUn_GL456370, chrUn_GL456379, chrUn_GL456366, chrUn_GL456368, chrUn_JH584304] and [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1, 1_GL456210_random, 1_GL456211_random, 1_GL456212_random, 1_GL456213_random, 1_GL456221_random, 2, 3, 4, 4_GL456216_random, 4_GL456350_random, 4_JH584292_random, 4_JH584293_random, 4_JH584294_random, 4_JH584295_random, 5, 5_GL456354_random, 5_JH584296_random, 5_JH584297_random, 5_JH584298_random, 5_JH584299_random, 6, 7, 7_GL456219_random, 8, 9, MT, 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)


And the header for both BAM files and fasta dict is below:

samtools view -H unaligned_mc_tagged_polyA_filtered_P5.bam
@HD VN:1.5 SO:queryname
@RG ID:A SM:P5

samtools view -H Aligned.out_P5.sorted.bam
@HD VN:1.5 SO:queryname
@SQ SN:chr1 LN:195471971
@SQ SN:chr10 LN:130694993
@SQ SN:chr11 LN:122082543
@SQ SN:chr12 LN:120129022
@SQ SN:chr13 LN:120421639
@SQ SN:chr14 LN:124902244
@SQ SN:chr15 LN:104043685
@SQ SN:chr16 LN:98207768
@SQ SN:chr17 LN:94987271
@SQ SN:chr18 LN:90702639
@SQ SN:chr19 LN:61431566
@SQ SN:chr1_GL456210_random LN:169725
@SQ SN:chr1_GL456211_random LN:241735
@SQ SN:chr1_GL456212_random LN:153618
@SQ SN:chr1_GL456213_random LN:39340
@SQ SN:chr1_GL456221_random LN:206961
@SQ SN:chr2 LN:182113224
@SQ SN:chr3 LN:160039680
@SQ SN:chr4 LN:156508116
@SQ SN:chr4_GL456216_random LN:66673
@SQ SN:chr4_JH584292_random LN:14945
@SQ SN:chr4_GL456350_random LN:227966
@SQ SN:chr4_JH584293_random LN:207968
@SQ SN:chr4_JH584294_random LN:191905
@SQ SN:chr4_JH584295_random LN:1976
@SQ SN:chr5 LN:151834684
@SQ SN:chr5_JH584296_random LN:199368
@SQ SN:chr5_JH584297_random LN:205776
@SQ SN:chr5_JH584298_random LN:184189
@SQ SN:chr5_GL456354_random LN:195993
@SQ SN:chr5_JH584299_random LN:953012
@SQ SN:chr6 LN:149736546
@SQ SN:chr7 LN:145441459
@SQ SN:chr7_GL456219_random LN:175968
@SQ SN:chr8 LN:129401213
@SQ SN:chr9 LN:124595110
@SQ SN:chrM LN:16299
@SQ SN:chrX LN:171031299
@SQ SN:chrX_GL456233_random LN:336933
@SQ SN:chrY LN:91744698
@SQ SN:chrY_JH584300_random LN:182347
@SQ SN:chrY_JH584301_random LN:259875
@SQ SN:chrY_JH584302_random LN:155838
@SQ SN:chrY_JH584303_random LN:158099
@SQ SN:chrUn_GL456239 LN:40056
@SQ SN:chrUn_GL456367 LN:42057
@SQ SN:chrUn_GL456378 LN:31602
@SQ SN:chrUn_GL456381 LN:25871
@SQ SN:chrUn_GL456382 LN:23158
@SQ SN:chrUn_GL456383 LN:38659
@SQ SN:chrUn_GL456385 LN:35240
@SQ SN:chrUn_GL456390 LN:24668
@SQ SN:chrUn_GL456392 LN:23629
@SQ SN:chrUn_GL456393 LN:55711
@SQ SN:chrUn_GL456394 LN:24323
@SQ SN:chrUn_GL456359 LN:22974
@SQ SN:chrUn_GL456360 LN:31704
@SQ SN:chrUn_GL456396 LN:21240
@SQ SN:chrUn_GL456372 LN:28664
@SQ SN:chrUn_GL456387 LN:24685
@SQ SN:chrUn_GL456389 LN:28772
@SQ SN:chrUn_GL456370 LN:26764
@SQ SN:chrUn_GL456379 LN:72385
@SQ SN:chrUn_GL456366 LN:47073
@SQ SN:chrUn_GL456368 LN:20208
@SQ SN:chrUn_JH584304 LN:114452
@PG ID:STAR PN:STAR VN:STAR_2.5.3a CL:STAR --runThreadN 12 --genomeDir star_Index --readFilesIn /data/murphy/home/skim/Olga/Vera/unaligned_mc_tagged_polyA_filtered_P5.fastq --sjdbGTFfile mm10_transcriptome/gencode.vM15.annotation.gtf --sjdbOverhang 74
@CO user command line: STAR --runThreadN 12 --genomeDir star_Index --sjdbGTFfile mm10_transcriptome/gencode.vM15.annotation.gtf --sjdbOverhang 74 --readFilesIn /data/murphy/home/skim/Olga/Vera/unaligned_mc_tagged_polyA_filtered_P5.fastq

vi mm10.dict
@HD VN:1.4 SO:unsorted
@SQ SN:10 LN:130694993 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:7831ecda5dd6bcf838e2452ea0139eac
@SQ SN:11 LN:122082543 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:e168c7a3194813f597181f26bb1bd13f
@SQ SN:12 LN:120129022 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:671f85bb54a6e097d631e2e2dd813ad4
@SQ SN:13 LN:120421639 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:7f9b9fa3fbd9a38634107dfdc7fd8dc8
@SQ SN:14 LN:124902244 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:bf4e1efa25a8fd23b41c91f9bcb86388
@SQ SN:15 LN:104043685 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:106358dace00e5825ae337c1f1821b5e
@SQ SN:16 LN:98207768 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:5482110a6cedd3558272325eee4c5a17
@SQ SN:17 LN:94987271 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:0d21e8edbfcd8410523b2b94e6dae892
@SQ SN:18 LN:90702639 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:46fda2f7e6dbf91bff91d6703e004afb
@SQ SN:19 LN:61431566 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:7d363594531514ce41dfacfd97bc995d
@SQ SN:1 LN:195471971 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:c4ec915e7348d42648eefc1534b71c99
@SQ SN:1_GL456210_random LN:169725 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:0cc560d98f9f22f4385397db82e1c108
@SQ SN:1_GL456211_random LN:241735 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:36e85680c669756c9a1554cf31c9de03
@SQ SN:1_GL456212_random LN:153618 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:4c4dc3bfe987e3bc4ef4756bef269373
@SQ SN:1_GL456213_random LN:39340 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:d4cb9051fe171205dd39980e110bf63e
@SQ SN:1_GL456221_random LN:206961 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:e21da65d7276b256b8edf92660a928b0
@SQ SN:2 LN:182113224 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:fe020a692e23f8468b376e14e304a10f
@SQ SN:3 LN:160039680 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:50f9385167e70825931231ddf1181b80
@SQ SN:4 LN:156508116 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:e7bdfb3ce7f54d2720b0718ed2ea063c
@SQ SN:4_GL456216_random LN:66673 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:7960016dce00dda7d58501e8f5799ec4
@SQ SN:4_GL456350_random LN:227966 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:5749f57d6c9e7ffbb4f82294d28598ba
@SQ SN:4_JH584292_random LN:14945 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:c2ff41899e0f684fd93b28c58756e02f
@SQ SN:4_JH584293_random LN:207968 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:dcd15cdff49363080fd1a719fd03d69b
@SQ SN:4_JH584294_random LN:191905 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:6c5948764eea003ab2f734ecd1f8295f
@SQ SN:4_JH584295_random LN:1976 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:ebc2f8438cbd080b53dc1cf528bf070e
@SQ SN:5 LN:151834684 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:095f3d4ebe1f0bafff057cc9b130186d
@SQ SN:5_GL456354_random LN:195993 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:61643b629b3105fd2f32cc82871ca8e0
@SQ SN:5_JH584296_random LN:199368 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:9b5b5f3af54ac1c2e91964a2c8b3f9ee
@SQ SN:5_JH584297_random LN:205776 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:efb1b00ffad6dd710ffd5d46ce94a25c
@SQ SN:5_JH584298_random LN:184189 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:1910644b4393b414d16774d3a1b73c49
@SQ SN:5_JH584299_random LN:953012 UR:file:/broad/mccarroll/software/metadata/individual_reference/mm10/mm10.fasta M5:b6bc88bfe26ef155b5fe2a7b90830ca5
..................................................................

Could you figure out the problem?

Thank you

Answers

Sign In or Register to comment.