Created
October 4, 2012 16:48
-
-
Save benjeffery/3834877 to your computer and use it in GitHub Desktop.
Hetrozygosity
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
from collections import Counter | |
def hetrozygosity(reads): | |
base_count = Counter(reads) | |
return 1.0-(float(base_count.most_common(1)[0][1])/sum(base_count.values())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment