ragtag_utilities/ScaffoldGraph.py
def steal_weights_from(self, in_sg):
        """ Replace weights with matching weights from a new scaffold graph. All other edge data remains. """
        G = ScaffoldGraph(self.components_fasta_fname)
        for u, v in self.edges:
            if in_sg.has_edge(u, v):
                # Make a copy of the edge data and remove the weight
                new_edge_data = dict(self.graph[u][v])
                new_edge_data.pop("weight")
                G.add_edge(u, v, weight=in_sg[u][v]["weight"], **new_edge_data)

        return G
 Replace weights with matching weights from a new scaffold graph. All other edge data remains. 
Replace weights with matching weights from a new scaffold graph. All other edge data remains.
Replace weights with matching weights from a new scaffold graph . All other edge data remains .
def steal_weights_from(self, in_sg):
        G = ScaffoldGraph(self.components_fasta_fname)
        for u, v in self.edges:
            if in_sg.has_edge(u, v):
                new_edge_data = dict(self.graph[u][v])
                new_edge_data.pop("weight")
                G.add_edge(u, v, weight=in_sg[u][v]["weight"], **new_edge_data)
        return G
def steal_weights_from ( self , in_sg ) : G = ScaffoldGraph ( self . components_fasta_fname ) for u , v in self . edges : if in_sg . has_edge ( u , v ) : new_edge_data = dict ( self . graph [ u ] [ v ] ) new_edge_data . pop ( "weight" ) G . add_edge ( u , v , weight = in_sg [ u ] [ v ] [ "weight" ] , ** new_edge_data ) return G
Replace weights with matching weights from a new scaffold graph.
Replace weights with matching weights from a new scaffold graph .
""" Replace weights with matching weights from a new scaffold graph. All other edge data remains. """ # Make a copy of the edge data and remove the weight
self
in_sg