The current GATK version is 3.8-0
Examples: Monday, today, last week, Mar 26, 3/26/04

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

You can opt in to receive email notifications, for example when your questions get answered or when there are new announcements, by following the instructions given here.

#### ☞ Got a problem?

1. Search using the upper-right search box, e.g. using the error message.
3. Include tool and Java versions.
4. Tell us whether you are following GATK Best Practices.
5. Include relevant details, e.g. platform, DNA- or RNA-Seq, WES (+capture kit) or WGS (PCR-free or PCR+), paired- or single-end, read length, expected average coverage, somatic data, etc.
6. For tool errors, include the error stacktrace as well as the exact command.
7. For format issues, include the result of running ValidateSamFile for BAMs or ValidateVariants for VCFs.
8. For weird results, include an illustrative example, e.g. attach IGV screenshots according to Article#5484.
9. For a seeming variant that is uncalled, include results of following Article#1235.

#### ☞ Formatting tip!

Wrap blocks of code, error messages and BAM/VCF snippets--especially content with hashes (#)--with lines with three backticks (  ) each to make a code block as demonstrated here.

GATK version 4.beta.3 (i.e. the third beta release) is out. See the GATK4 beta page for download and details.

# MarkDuplicates error Value was put into PairInfoMap more than once

FinlandMember
edited April 2016

I get this error from a MarkDuplicates and all the questions I've found online comment on merging fastq file and ending up with read name from more than one original fastq files. I get this error without having merged fastq files and only having one pair of reads in bam file with same name with flags 129 and 81 (so read 2 and read 1). Is there any other reason why this message could come up?

I'm using an older version of the Picard (as a part of pipeline) though so if there has been bugs in this area then I'm likely hitting them.

Thanks,

Tagged:

#### Issue · Github April 2016 by Sheila

Issue Number
805
State
closed
Last Updated
Assignee
Array
Milestone
Array
Closed By
vdauwera

• FinlandMember

I also got the same message with picard version 1.141 which I think is not that old version.

@hena
Hi,

I will ask our Picard expert to get back to you. However, in the meantime, you can try using the latest version of Picard (2.2.1).

-Sheila

@hena
Hi,

Can you also try validating your bam file with ValidateSamFile?

Thanks,
Sheila

• FinlandMember
edited April 2016

2.2.1 seems to create same error same as running ValidateSamFile in summary mode. Here is the stacktrace from the ValidateSamFile

Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once. 1: HWI-xxxxxxx:111:C8LG3ANXX:8:2209:18364:77568
at htsjdk.samtools.CoordinateSortedPairInfoMap.remove(CoordinateSortedPairInfoMap.java:86)
at htsjdk.samtools.SamFileValidator\$CoordinateSortedPairEndInfoMap.remove(SamFileValidator.java:749)
at htsjdk.samtools.SamFileValidator.validateMateFields(SamFileValidator.java:484)
at htsjdk.samtools.SamFileValidator.validateSamRecordsAndQualityFormat(SamFileValidator.java:282)
at htsjdk.samtools.SamFileValidator.validateSamFile(SamFileValidator.java:200)
at htsjdk.samtools.SamFileValidator.validateSamFileSummary(SamFileValidator.java:128)
at picard.sam.ValidateSamFile.doWork(ValidateSamFile.java:187)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

We've seen this error pop up for several different reasons; the main two are the fastq merging problem, and secondary hits not marked appropriately due to not using -M with BWA MEM. Not sure what's happening in your case, but if I remember the SAM flag rules correctly, the reads in a mate pair would have 129 and 65 respectively, or 161 and 81 (if on reverse strand). I think the program may not be recognizing that your reads are part of a mate pair because of that, and is instead considering them as part of different pairs. This could be caused by a mistake made by the aligner.

If you only have one affected read pair out of your entire bam file I would advise just throwing out that one read pair and proceeding with your analysis. I believe you should be able to eliminate improperly paired reads by using samtools view -f 0x2` -- but don't take my word for it, read this blog post about sam flags and be sure to check the samtools docs too.

• FinlandMember

The data is aligned with bwa aln + sampe, so there should not be secondary alignments. There is however single reads included but that has been working before only in this one read pair this problem has appeared. After removing that pair, it failed again with pair with flags 97 and 145 and after removing them as well I have pair again with 81 and 129. I also noticed that the mate information seems to be wrong on these reads and that they seem match other reads for some reason. Could this have an effect? I'm going to do name sort -> samtools fixmate -> position sort in order to see if that would help.