ragtag_utilities/ScaffoldGraph.py
def connect_and_write_gml(self, f):
        """
        Connect scaffold edges, then write the graph in GML format
        :param f: Write the graph to this file handle.
        """
        G = self.graph.copy()
        node_base_set = set([i[:-2] for i in list(G.nodes)])
        for node in node_base_set:
            G.add_edge(node + "_b", node + "_e")

        # networkx doesn't like writing non-string attributes to GML
        for u, v in G.edges:
            for key in list(G[u][v].keys()):
                G[u][v][key] = str(G[u][v][key])
        nx.readwrite.gml.write_gml(G, f)

        Connect scaffold edges, then write the graph in GML format
        :param f: Write the graph to this file handle.
        
Connect scaffold edges, then write the graph in GML format
Connect scaffold edges then write the graph in GML format
def connect_and_write_gml(self, f):
        G = self.graph.copy()
        node_base_set = set([i[:-2] for i in list(G.nodes)])
        for node in node_base_set:
            G.add_edge(node + "_b", node + "_e")
        for u, v in G.edges:
            for key in list(G[u][v].keys()):
                G[u][v][key] = str(G[u][v][key])
        nx.readwrite.gml.write_gml(G, f)
def connect_and_write_gml ( self , f ) : G = self . graph . copy ( ) node_base_set = set ( [ i [ : - 2 ] for i in list ( G . nodes ) ] ) for node in node_base_set : G . add_edge ( node + "_b" , node + "_e" ) for u , v in G . edges : for key in list ( G [ u ] [ v ] . keys ( ) ) : G [ u ] [ v ] [ key ] = str ( G [ u ] [ v ] [ key ] ) nx . readwrite . gml . write_gml ( G , f )
Connect scaffold edges, then write the graph in GML format
Connect scaffold edges then write the graph in GML format
"""
        Connect scaffold edges, then write the graph in GML format
        :param f: Write the graph to this file handle.
        """ # networkx doesn't like writing non-string attributes to GML
self
f
Write the graph to this file handle.
Write the graph to this file handle .