This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mappability calculation after mapping with Bowtie2

Hi All,

I mapped a mouse DNA sequence data to mouse genome mm10 and want to calculate mappability. Are there any tools or proper way to do this? Thank you in advance.

alignment

1 answer

I assume you generated reads that should evenly cover the genome. In that case, "samtools depth" with awk will allow you to get a proper mappability track.

Yes, my reads cover the genome. Could you please tell me more detail about how to do it or where you know I can find a calculation example? I am new in the field. Thank you.

Sure, let's assume that you generated reads with 50x coverage of the genome (this is the 50 below). You could do something like:

samtools depth -aa some_alignment_file.bam | awk '{if($3>50){$3=50} printf("%s\t%i\t%i\t%f", $1,$2-1,$2,$3/50)}' > mappability.bedGraph

Note, however, that UCSC has mappability tracks for some organisms, so you might also check there.

Log in to answer this question.