Will flags in sam files be updated after filtering?
0
0
Entering edit mode
22 months 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?

sam alignment samtools • 564 views
ADD COMMENT
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thanks! Is generating a self-made python script to recommended in this case?

ADD REPLY
1
Entering edit mode

It's always recommended if you ask me because it both saves you from typo mistakes and also documents what you did.

ADD REPLY

Login before adding your answer.

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