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?
Thank you so much!!!