How to filter both reads of paired end reads by AS when only 1 of the 2 reads has an AS below 50
I am trying to filter reads with an AS below 50. I found that I could use sambamba for this with the command:
sambamba view -F '[AS]' >= 50 /path/to/input/file > /path/to/output/file
The problem with this command is that if a read has a mate with an AS above that threshold, that read won't be deleted and the flag of the mate with no pair still says that it is read is paired. Is there a command with sambamba to filter both pairs if 1 has a lower AS than the threshold or can I filter unpaired reads with a wrong flag with another tool?
Kind Regards, Jelle
• 1,293 views
•
link
0 answers
No answers yet.
Log in to answer this question.