Specific examples of 5 one-step process to find the mutation
samtools markdup
proper sequence of operations
- The first sort can be omitted if the file is already name ordered
samtools sort -n -o namesort.bam example.bam
Must -n
not be omitted
- Add ms and MC tags for markdup to use later
samtools fixmate -m namesort.bam fixmate.bam
-m
can not be less
- Markdup needs position order
samtools sort -o positionsort.bam fixmate.bam
- Finally mark duplicates
samtools markdup positionsort.bam markdup.bam