samtools duplicate reads removing
1
0
Entering edit mode
4.1 years ago
Dr.Animo ▴ 130

I used samtools to remove duplicate reads. First I used fixmate, it requires the reads sorted according to their name. I used the following command

samtools sort -n -@ 32 in.bam | samtools fixmate -r -@ 32 - sort.fx.bam

then I try samtools markdup

samtools markdup -r -@ 32 sort.fx.bam out.uq.bam

but it gave me an error

error: queryname sorted, must be sorted by coordinate.

Then I used following command

samtools sort  -@ 32 sort.fx.bam | samtools markdup -r -@ 32 - out.uq.bam

but again it gives me the following error message.

error: no ms score tag. Please run samtools fixmate on file first.

Anyone, please guide me.

samtools duplicate reads • 2.1k views
ADD COMMENT
5
Entering edit mode
4.1 years ago

add option m to samtools fixmate:

-m           Add mate score tag
ADD COMMENT

Login before adding your answer.

Traffic: 1352 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6