How samblaster identifies duplicates
masterA duplicate read pair is defined by a signature consisting of the combination of:
- Sequence name (QNAME)
- Strand
- Reference offset where the 5' end of the read would fall if fully aligned (calculated via POS, strand, and CIGAR).
This signature matches the logic used by Picard MarkDuplicates.
Key Rules:
- For mapped pairs, both signatures must match.
- For orphans (one side mapped), the signature of the mapped read must match a previously seen orphan. Since version 0.1.25, forward and reverse strand orphans/singletons can be duplicates of each other.
- No doubly unmapped pair is marked as a duplicate.
- Any secondary or supplementary alignment associated with a duplicate primary alignment is also marked as a duplicate.
Requirement: Input SAM files must be read-id grouped (all alignments for a single QNAME must be in adjacent lines).