Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
Attention:
We will be out of the office on October 14, 2019, due to the U.S. holiday. We will return to monitoring the forum on October 15.

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

  • 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.