I might word my initial question like another post, but I really have the opposite meaning, i think:Filtering multiple flags with SAMtools
I am trying to remove paired-end reads from a .SAM file where neither segment is mapped
But by "remove" I don't mean collect. I want all the read pairs where the forward read OR the reverse read OR both reads are mapped then I will use bam2fastq to get the reads and assemble.
I think there are pieces missing from my reference. I will use all these reads to try to assemble a better reference. So if one read maps to the reference, but its pair does not, that is a good read for me; the reverse read is possibly part of the sequence that is missing from my reference.
What SAM flags should I set?