Legofit
infers population history from nucleotide site patterns.
Functions | Variables
diverg.py File Reference

Functions

def diverg.usage ()
 
def diverg.openInput (fname)
 

Variables

bool diverg.dokl = False
 
 diverg.fname2 = None
 
 diverg.fname1 = sys.argv[1]
 
def diverg.f1 = openInput(fname1)
 
def diverg.f2 = openInput(fname2)
 
list diverg.pat1 = []
 
list diverg.prob1 = []
 
list diverg.pat2 = []
 
list diverg.prob2 = []
 
 diverg.line = line.strip()
 
 diverg.wid1 = max(9, len(fname1))
 
 diverg.wid2 = max(9, len(fname2))
 
int diverg.widpat = 7
 
 diverg.s1 = sum(prob1)
 
 diverg.s2 = sum(prob2)
 
string diverg.fmt = "%%%ds %%%ds" % (widpat, wid1)
 
float diverg.KLsum = 0.0
 
list diverg.kl = prob2[i]*log(prob2[i]/prob1[i])