Skip to content

Instantly share code, notes, and snippets.

@antunderwood
Created June 3, 2010 16:42
Show Gist options
  • Save antunderwood/424122 to your computer and use it in GitHub Desktop.
Save antunderwood/424122 to your computer and use it in GitHub Desktop.
number_of_strains = 500
k = 900 # number of variant sites in the alignment, i.e all non-consrved columns
harmonic_number = (1...number_of_strains).inject{|sum, n| sum + 1.0/n} # note ... so that this will calculate harmonic of n-1
theta = k/harmonic_number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment