lh3 / bwa

Burrow-Wheeler Aligner for short-read alignment (see minimap2 for long-read alignment)
GNU General Public License v3.0
1.54k stars 557 forks source link

Reads with mapq=0 not mapped to the same location as their mates #405

Open pinbo opened 1 year ago

pinbo commented 1 year ago

Hi Developers, I am working on wheat, which is allohexaploid with 3 highly similar subgenomes (A, B, D). Genes across the 3 genomes share about 97% similarity, so for paired end reads, sometimes one read could be equally mapped to all 3 subgenomes (say chromosome 1A and 1B and 1D, mapq=0), but its mate is uniquely mapped to one subgenome (say 1A) due to 1 to a few SNPs. I think for this situation, bwa mem should put the read on the same chromosome (1A) as its mate, but actually bwa mem seems to randomly select a primary location without considering its mate's location. I checked minimap2 and bowtie2, and they all put the reads on the same chromosome for this situation (one read has mapq0 and its mate has mapq>0). Could you fix this?

Thanks,

Junli Zhang