Hello everybody,
I am trying to figure how BWA and Bowtie define a read as unique.
Making here an algorithm to decide if a read is unique or not is not the purpose. Just to look how BWA and Bowtie mention a read as unique.
I don't have much experience in using aligners but here is what I understood:
- BWA: looking at the XT:A:U flag is perfect in my case. I noticed in several SAM files that when this flag is present, X0 is always equal to 1 (which makes sense
).
- Bowtie: I'm a bit confused and here is my real issue. For now, I check if the XS flag is set or not. It is set only when a second-best alignment is found. So if it is not set: my read is unique…
I have been looking for a while for that answer and I only found information about "How to get unique reads in Bowtie using command line". But this is in Bowtie; I want to process here its SAM output!
Am I going wrong somewhere here?
Is there a better way to figure that out?
Any help would be greatly appreciated
Thanks a lot!
PS: I am not taking into account the MAPQ here since it is the purpose of another filter of my application.
I am trying to figure how BWA and Bowtie define a read as unique.
Making here an algorithm to decide if a read is unique or not is not the purpose. Just to look how BWA and Bowtie mention a read as unique.
I don't have much experience in using aligners but here is what I understood:
- BWA: looking at the XT:A:U flag is perfect in my case. I noticed in several SAM files that when this flag is present, X0 is always equal to 1 (which makes sense

- Bowtie: I'm a bit confused and here is my real issue. For now, I check if the XS flag is set or not. It is set only when a second-best alignment is found. So if it is not set: my read is unique…
I have been looking for a while for that answer and I only found information about "How to get unique reads in Bowtie using command line". But this is in Bowtie; I want to process here its SAM output!
Am I going wrong somewhere here?

Is there a better way to figure that out?
Any help would be greatly appreciated

Thanks a lot!
PS: I am not taking into account the MAPQ here since it is the purpose of another filter of my application.