Picard MarkDuplicates error: Value was put into PairInfoMap more than once
2
0
Entering edit mode
8.2 years ago
Floydian_slip ▴ 170

Hi,

I saw this error encountered by a few other users and I tried all that was suggested but nothing worked for me. I am still getting the error on Picard MarkDuplicates step:

Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once.  1: GIAB:HWI-ST1023:220:H84P1ADXX:2:2115:7649:16177

Here is what I did:

First sorted and converted bams to fastq as I did not have original fastqs:

samtools sort -n NIST-hg001-7001-b-ready.bam -o NIST-hg001-7001-b-ready.sorted.bam
bedtools bamtofastq -i NIST-hg001-7001-b-ready.sorted.bam -fq NIST-hg001-7001-b-ready_R1.fastq -fq2 NIST-hg001-7001-b-ready_R2.fastq

Then I aligned using BWA mem:

bwa mem -t 8 -M -R '@RG\tID:GIAB\tSM:NA12878\tPL:illumina\tLB:lib\tPU:7001' reference_genome/hg19 NIST-hg001-7001-ready_R1.fastq NIST-hg001-7001-ready_R2.fastq > NIST-hg001-7001.sam

Sort Sam using Picard:

java -jar picard-tools-1.119/SortSam.jar I=NIST-hg001-7001.sam O=NIST-hg001-7001_sorted.bam SO=coordinate CREATE_INDEX=true

And mark duplicates:

java -jar picard-tools-1.119/MarkDuplicates.jar I=NIST-hg001-7001_sorted.bam O=NIST-hg001-7001_dedup.bam M=NIST-hg001-7001.metric

When it gives the error:

Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once.  1: GIAB:HWI-ST1023:220:H84P1ADXX:2:2115:7649:16177

I tried to clean the bam using Samtools:

samtools view -h NIST-hg001-7001_sorted.bam | grep -v null | samtools view -bS - > cleaned.bam

And also used FixMateInformation using Picard:

java -jar /home/nitin/Bioinformatics/Toolbox/src/Misc/picard-tools-1.119/FixMateInformation.jar I=NIST-hg001-7001_sorted.bam O=NIST-hg001-7001_fixedMate.bam

But none of them worked. I still get the same error.

Does anybody have a solution. I have spent a lot of time on it without any use. Thank a lot in advance.

~N

Bedtools MarkDuplicates Samtools picard • 6.7k views
ADD COMMENT
0
Entering edit mode
8.2 years ago

version of picard is just too old. 1.119: (25 August 2014 ) it doesn't support the supplementary flag.

https://github.com/broadinstitute/picard/issues/72

ADD COMMENT
0
Entering edit mode

That did not help either. Upgrading to the latest version 2.1.0 also gave the same error. Any other suggestions?

ADD REPLY
0
Entering edit mode

I am having the same problem and I am using Picard's version 1.141. Any other suggestion?

Thanks in advance!

Mónica

ADD REPLY
0
Entering edit mode
8.0 years ago

I had a similar problem and had to first use samtools to filter out secondary alignments. i.e.

bwa mem -M -t 5 -k 19 -R "..." ref.fasta in1.fastq.gz in2.fastq.gz |
samtools view -F 0x100 -bSu - | 
samtools sort -o output.bam

Then run Picard's MarkDuplicates.

Hope that helps!

ADD COMMENT

Login before adding your answer.

Traffic: 2523 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6