Entering edit mode
2.4 years ago
Wang Cong
▴
10
Will the flags be updated if I remove the low mapping quality reads and reads with high mismatches in the sam file after the alignment? For example, if only one read of the paired reads is removed, will that remained single read be removed using flag 0x2? If not, does it have to be solved by self-made scripts?
It will not be done automatically, but you can run
samtools fixmate
to update flags in terms of the read now no longer being paired.http://www.htslib.org/doc/samtools-fixmate.html
Thanks! Is generating a self-made python script to recommended in this case?
It's always recommended if you ask me because it both saves you from typo mistakes and also documents what you did.