This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BWA mem align reads with MQ = 0 to only one region (reference genome has two similar sequences).

So, i use WBA mem to align my reads (from NGS panels) to reference genome. My reads align to two different, but very similar regions. I want to prevent align these reads to non target region when i use BWA mem. I hope that will make MQ of my reads > 0 because they will be aligned only to target region. Maybe i can use bed-file contained regions that BWA should ignore to align reads or something like that... I did not found something like that in BWA docs.

ngs bwa

1 answer

You could do something like this:

bwa mem genome.fa reads.fastq | samtools view -b -L manifest.bed -U non-overlapping.bam - > overlapping.bam

Perhaps I can do that, but after alignment I would like to do a variant calling. As I know variant call tools (GATK) just ignore reads with MQ - 0. And even if i do that u wrote, I anyway get bam file with those reads with MQ = 0.

Log in to answer this question.