Help understanding why filtering for unmapped mate isn't working
1
0
Entering edit mode
5.3 years ago
rleach ▴ 180

I'm sure this is a dumb question, but I've got a workflow in galaxy that trims adapters, removes duplicates, and then filters for quality and to get only reads whose partner is mapped. The following analysis complains that it can't find the mate for a ton of reads. I looked at the sam file and discovered that there are indeed singletons with no mate, but the individual sam records claim the mate is mapped, which is why I'm guessing the filtering "mapping_quality >= 20 and not (unmapped or mate_is_unmapped)" isn't working.

Is there a tool that can repair the records for mates that have been filtered?

alignment • 803 views
ADD COMMENT
0
Entering edit mode
5.3 years ago
ATpoint 85k

Yes, samtools fixmate. It will modify that flag of the retained read and will set it to unpaired if the mate has been filtered out. It requires name-sorted files. http://www.htslib.org/doc/samtools.html

ADD COMMENT
0
Entering edit mode

Thank you so much!!!

ADD REPLY

Login before adding your answer.

Traffic: 1800 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