Hi, Biostars.
I have a SAM file with some PCR duplicates mapped by bowtie2.
The original fastq reads of these PCR duplicates are not same sequence length,
so I cannot use "samtools rmdup" command.
I would like to extract unique position sam lines with all fields of orginal sam. Anyone has a solution? thanks.
----Example---
name1 0 chr1 124344 . . . . . AGTAGGTGGGG FFFFFFFFFFF AS:i:0 XN:i:0 XM:i:0
name2 0 chr1 124344 . . . . . AGTAGGTGGGGGATT FFFFFFFFFFFFFFF AS:i:0 XN:i:0 XM:i:0
↓
name1 0 chr1 124344 . . . . . AGTAGGTGGGG FFFFFFFFFFF AS:i:0 XN:i:0 XM:i:0
thanks dariober! Your program seems to be so useful. I don't know picard MarkDuplicates, I also try it.