Created
March 13, 2014 16:49
-
-
Save inodb/9532170 to your computer and use it in GitHub Desktop.
Count the number of reads mapping to contigs of a given length
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
samtools idxstats map.bam | awk '{split ($0, a, "\t")} {if (a[2]>999) SUM+=a[3]} END {print SUM}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment