Picard Markduplicates Error: Value was put into pairInfoMap more than once

Dear all,
I got an error when i use picard tools to mark duplicates
my picardtools version 2.8.3
my sample: PE, one lane
BWA + GATK

get index of Ref

bwa index /disk/BGI_jiangzy_humilis/BGI_j_humilis.fa
java -jar /disk/share/picard-tools-2.8.3/picard.jar CreateSequenceDictionary REFERENCE=/disk/BGI_jiangzy_humilis/BGI_j_humilis.fa OUTPUT=/disk/BGI_jiangzy_humilis/BGI_j_humilis.dict
samtools faidx /disk/BGI_jiangzy_humilis/BGI_j_humilis.fa

mapping

bwa mem -t 20 -M -R "@RG\tID:Ph01111\tLB:Ph01111\tPL:Illumina\tPU:Ph01111\tSM:Ph01111" /disk/BGI_jiangzy_humilis/BGI_j_humilis.fa /disk/gtdata/jiangzy_mydata/test/11_1_clean.fq.gz /disk/gtdata/jiangzy_mydata/test/11_2_clean.fq.gz | gzip > /disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping.sam.gz

reorder

java -jar /disk/share/picard-tools-2.8.3/picard.jar ReorderSam REFERENCE=/disk/BGI_jiangzy_humilis/BGI_j_humilis.fa INPUT= /disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping.sam.gz OUTPUT= /disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder.sam.gz VALIDATION_STRINGENCY=LENIENT

Sam to bam

samtools view -bS /disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder.sam.gz -o /disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder.bam

sort

java -jar /disk/share/picard-tools-2.8.3/picard.jar SortSam I=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder.bam O=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder_sort.bam SORT_ORDER=coordinate

MarkDuplicates

java -jar /disk/share/picard-tools-2.8.3/picard.jar MarkDuplicates REMOVE_DUPLICATES= false INPUT=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder_sort.bam OUTPUT=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder_sort_MD.bam METRICS_FILE=marked_dup_metrics.txt CREATE_INDEX=true
Error:
Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once.
1: Ph01111:HWI-ST1307:159:C48TVACXX:7:1109:1787:63474

test

ValidateSamFile

java -jar /disk/share/picard-tools-2.8.3/picard.jar ValidateSamFile I=/disk/gtdata/jiangzy_mydata/test/mapping/新建文件夹/Ph01111_mapping_Reorder_sort.bam MODE=SUMMARY
Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once. 1: HWI-ST1307:159:C48TVACXX:7:1109:1787:63474
at htsjdk.samtools.CoordinateSortedPairInfoMap.ensureSequenceLoaded(CoordinateSortedPairInfoMap.java:133)
at htsjdk.samtools.CoordinateSortedPairInfoMap.remove(CoordinateSortedPairInfoMap.java:86)
at htsjdk.samtools.SamFileValidator$CoordinateSortedPairEndInfoMap.remove(SamFileValidator.java:765)
at htsjdk.samtools.SamFileValidator.validateMateFields(SamFileValidator.java:499)
at htsjdk.samtools.SamFileValidator.validateSamRecordsAndQualityFormat(SamFileValidator.java:297)
at htsjdk.samtools.SamFileValidator.validateSamFile(SamFileValidator.java:215)
at htsjdk.samtools.SamFileValidator.validateSamFileSummary(SamFileValidator.java:143)
at picard.sam.ValidateSamFile.doWork(ValidateSamFile.java:196)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)

FixMateInformation

java -jar /disk/share/picard-tools-2.8.3/picard.jar FixMateInformation I=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder.bam O=/disk/gtdata/jiangzy_mydata/test/mapping/Ph01111_mapping_Reorder_Fixed.bam

Error
Exception in thread "main" htsjdk.samtools.SAMException: Found two records that are paired, not supplementary, and first of the pair
at htsjdk.samtools.SamPairUtil$SetMateInfoIterator.advance(SamPairUtil.java:453)
at htsjdk.samtools.SamPairUtil$SetMateInfoIterator.next(SamPairUtil.java:499)
at htsjdk.samtools.SamPairUtil$SetMateInfoIterator.next(SamPairUtil.java:388)
at picard.sam.FixMateInformation.doWork(FixMateInformation.java:206)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:205)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:94)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:104)

Thank you very much for the help from all of you

Best Answer

  • john_jiangjohn_jiang Member
    Accepted Answer

    @Sheila said:
    @john_jiang
    Hi,

    If you search the forum with your error message, you will find some helpful threads.

    -Sheila

    Thank you very much, in fact I searched the forum, and also did many test about my original clean data, i think it's a data problem. Now , I use bammarkduplicates2 tool of biobambam to mark duplicates, it also work and more efficient in terms of runtime and memory requirements.

Answers

Sign In or Register to comment.