Skip to content

Instantly share code, notes, and snippets.

@benjeffery
Created October 4, 2012 16:48
Show Gist options
  • Save benjeffery/3834877 to your computer and use it in GitHub Desktop.
Save benjeffery/3834877 to your computer and use it in GitHub Desktop.
Hetrozygosity
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