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
Validate or comment your previous questions: