original_docstring: 
      Output the treemix tree as a series of edges and admix nodes
      
docstring: Output the treemix tree as a series of edges and admix nodes
docstring_tokens: Output the treemix tree as a series of edges and admix nodes
code: def print_treemix_tree(tree, parent, migs):
      """
      Output the treemix tree as a series of edges and admix nodes
      """
      for node in tree:
          hash, drift, children = node
  
          if hash not in migs:
              print "edge\t%s\t%s\t%s" % (hash, parent, labels[hash])
          else:
              migrant, percent = migs[hash]
              print "admix\t%s\t%s\t%s\t%s\t%s" % (labels[hash], parent, labels[migrant], (1-percent), percent)
  
          if len(children):
              print_treemix_tree(children, labels[hash], migs)
code_tokens: def print_treemix_tree ( tree , parent , migs ) : for node in tree : hash , drift , children = node if hash not in migs : print "edge\t%s\t%s\t%s" % ( hash , parent , labels [ hash ] ) else : migrant , percent = migs [ hash ] print "admix\t%s\t%s\t%s\t%s\t%s" % ( labels [ hash ] , parent , labels [ migrant ] , ( 1 - percent ) , percent ) if len ( children ) : print_treemix_tree ( children , labels [ hash ] , migs )
short_docstring: Output the treemix tree as a series of edges and admix nodes
short_docstring_tokens: Output the treemix tree as a series of edges and admix nodes
comment: """
      Output the treemix tree as a series of edges and admix nodes
      """