I would like use bwa mem to identify reads that align perfectly or almost perfectly with the reference genome over the entire read. I have tried:
bwa mem -B 40 -O 60 -E 10 H2007/genome.fa Left.fq Right.fq > stringent.sam.
This gives nearly perfect aligned regions, but the result includes many reads that align over only an internal contiguous region with their ends flapping around in the breeze. I would like set bwa mem to exclude these.
I have also played with the -T and -k flags and spent many minutes googling and reading, but no joy.
I would prefer not to have to resort to unix scripts to address this.