Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/c/g/CGAT-0.2.0/CGAT/Tree.py   CGAT(Download)
        # now we destroy the old tree structure, but keep node data. Nodes will be reconnected according to new outgroup
        for n in self.all_ids():
            self.node(n).prev=None
            self.node(n).succ=[]
 
        def dist2leaves( node_id ):
            node = self.node(node_id)
            if node.succ:
                map_N2Leaves[node_id] = max( [map_N2Leaves[s] + self.node(s).data.branchlength for s in node.succ ] )
 
        def dist2root( node_id ):
            node = self.node(node_id)
        def dist2other( node_id ):
            node = self.node(node_id)
            if node.prev != None:
                p = self.node(node.prev)
                root_dist = map_N2Root[node.prev] 

src/c/g/cgat-HEAD/CGAT/Tree.py   cgat(Download)
        # be reconnected according to new outgroup
        for n in self.all_ids():
            self.node(n).prev = None
            self.node(n).succ = []
 
        def dist2leaves(node_id):
            node = self.node(node_id)
            if node.succ:
                map_N2Leaves[node_id] = max(
                    [map_N2Leaves[s] + self.node(s).data.branchlength for s in node.succ])
 
        def dist2root(node_id):
            node = self.node(node_id)
        def dist2other(node_id):
            node = self.node(node_id)
            if node.prev is not None:
                p = self.node(node.prev)
                root_dist = map_N2Root[node.prev]