I mapped my reads to different chromosome reference, resulting in several different bam files. Then merge these bam files, and the same read could show up several times that suggest mapping to different chromosomes. It'll be sth like below:
SRR2620572.21798:AATTAG 16 chr1 470281 0 101M * 0 0 ACCCATACAAATAT......
SRR2620572.21798:AATTAG 16 chr22 51236457 37 101M * 0 0 ACCCATACAAATA......
Then do we have any available tools that could pick up the best mapping for the same read? For example like here, the same read map to both chr1 and chr22, however, the mapping quality for chr22 is way higher than chr1, so we'd like to retain the mapping for chr1 only. And if there's a tie, we'd like to randomly choose one, like what bwa does.
Note: I certainly know I could directly map the reads onto the whole genome reference. But that's NOT the project I'm working on.
Many thanks!
Are the reads paired or single end?