Commit 6a6f0950 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

code evolution to follow udg serial representation

parent 10497ebc
......@@ -28,7 +28,7 @@ class Dgraph(object):
def load(text, barcode_graph):
# basic split
text = text.replace(']', '')
head, h1, h2 = text.split('[')
_, head, h1, h2 = text.split('[')
# Head parsing
center = head.replace(' ', '')
......@@ -37,9 +37,9 @@ class Dgraph(object):
dg = Dgraph(center)
# Reload halves
h1 = [x.split(' ')[-2] for x in h1.split(',')]
h1 = [x for x in h1.split(',')]
h1 = [int(x) if x not in barcode_graph else x for x in h1]
h2 = [x.split(' ')[-2] for x in h2.split(',')]
h2 = [x for x in h2.split(',')]
h2 = [int(x) if x not in barcode_graph else x for x in h2]
dg.put_halves(h1, h2, barcode_graph)
......
......@@ -8,7 +8,7 @@ import networkx as nx
def parse_args():
parser = argparse.ArgumentParser(description='Process some integers.')
parser = argparse.ArgumentParser(description='Process a d2 graph (complete graph or path) to evaluate its quality.')
parser.add_argument('filename', type=str,
help='The file to evalute')
parser.add_argument('--type', '-t', choices=["d2", "path", "d2-2annotate", "dgraphs"], default="path", required=True,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment