Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed error
  • Loading branch information
sun13005 committed May 9, 2017
1 parent cfbd353 commit fa55ef6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions brnlenMCMC.py
Expand Up @@ -129,7 +129,7 @@ def allocatePartial(node, patterns, rates):
node.partial[i*16+l*4 + 1] = pfromC_lchild*pfromC_rchild

#######################################################
#

pGA = pdiff*(node.lchild.partial[i*16+l*4 + 0])
pGC = pdiff*(node.lchild.partial[i*16+l*4 + 1])
pGG = psame*(node.lchild.partial[i*16+l*4 + 2])
Expand Down Expand Up @@ -166,10 +166,6 @@ def allocatePartial(node, patterns, rates):
log_like = sum(like_list)
return log_like

def replaedglen():
old_newick = readnewick(tree)



def mcmcbrn(postorder, patterns, rates):
nodes = readnewick(treenewick())
Expand Down Expand Up @@ -199,7 +195,6 @@ def mcmcbrn(postorder, patterns, rates):
print '**************************'

newf.write('\n')
# print
for r in range(n_gen):
for i in range(len(postorder)):
preedgelen = nodes[i].edgelen
Expand Down Expand Up @@ -246,7 +241,7 @@ def mcmcbrn(postorder, patterns, rates):
print
print '**************************'

newf.flush()
# newf.flush()

mcmc+=1

Expand Down Expand Up @@ -491,5 +486,4 @@ if __name__ == '__main__':
rates_list = gammaRates(alpha)
postorder = readnewick(treenewick())
result = prepareTree(postorder, readSeq.patterns(), rates_list)
# try1 = readSeq.patterns()
result2 = mcmcbrn(postorder, readSeq.patterns(), rates_list)

0 comments on commit fa55ef6

Please sign in to comment.