Question: Picard MarkDuplicates error: Value was put into PairInfoMap more than once
0
gravatar for Floydian_slip
3.8 years ago by
Floydian_slip130
United States
Floydian_slip130 wrote:

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

ADD COMMENTlink modified 3.7 years ago by Peter Georgeson0 • written 3.8 years ago by Floydian_slip130
0
gravatar for Pierre Lindenbaum
3.8 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

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 COMMENTlink written 3.8 years ago by Pierre Lindenbaum124k

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

ADD REPLYlink written 3.8 years ago by Floydian_slip130

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

Thanks in advance!

Mónica

 

ADD REPLYlink written 3.8 years ago by mcff2360
0
gravatar for Peter Georgeson
3.7 years ago by
Australia
Peter Georgeson0 wrote:

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 COMMENTlink written 3.7 years ago by Peter Georgeson0
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: 735 users visited in the last hour