This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to avoid multiple mapped while no mismatch allow

I have read many manuals of alignment tools, many of them deal the multiple mapped by reporting the best alignment base on their alignment score (such as bowtie,BWA), but i want to know if i already set the mismatch as zero, then all multiple mapped should be same score right? What can i do to avoid reads that can find multiple perfectly matches?

rna-seq chip-seq alignment

but i want to know if i already set the mismatch as zero, then all multiple mapped should be same score right?

What do you mean exactly?

i can understand if mapping with allowing some mismatches there will be different in alignment score, but if i don't allow any mismatch it should be all perfectly match and same score.

1 answer

What can i do to avoid reads that can find multiple perfectly matches

If by that you mean to filter out reads that map equally well to multiple locations, then you should filter by MAPQ score in the alignment file, e.g. samtools view -b -q 5 in.bam > out.bam. The exact MAPQ threshold you use for filtering shouldn't matter much since most reads usually have either very low or very high mapq.

Consider also that a read can have high MAPQ even with some mismatches so setting the number of mismatches to zero could be too stringent and it could introduce some biases since some mismatches may be genuine SNPs.

The purpose i want to have this kind of restriction owing to i trying to compare genes with similar sequence, i hope to avoid reads that is hard to distinguish from each other.

Can you provide an example of alignments you want to keep and examples that you want to filter out?

Log in to answer this question.