问题:
WES 分析中,在标记重复reads这一步出现如下错误:
Exception in thread "main" htsjdk.samtools.SAMException: Value was put into PairInfoMap more than once
解决:
比对完毕的bam文件中存在 unpaired reads,需要对这一步进行过滤后重新标记,bwa比对完毕以后通过samtools进行过滤,代码如下:
代码:samtools view -f 0x2 -b in.bam > out.bam
随后重新进行排序和MarkDuplicates,无报错。
参考:
https://bioinformatics.stackexchange.com/questions/19271/how-to-remove-the-unpaired-reads-in-sam-bam-files
https://gatk.broadinstitute.org/hc/en-us/community/posts/4408717387803-SAMException-Value-was-put-into-PairInfoMap-more-than-once