mirror of
https://github.com/Findus23/halo_comparison.git
synced 2024-09-19 16:03:50 +02:00
15 lines
405 B
Python
15 lines
405 B
Python
from sys import argv
|
|
|
|
print("digraph G {")
|
|
# print("graph [ overlap=false ]")
|
|
with open(argv[1]) as f:
|
|
next(f)
|
|
for line in f:
|
|
if line.startswith("#"): continue
|
|
cols = line.split()
|
|
if len(cols) < 5: continue
|
|
progenitor = int(cols[1])
|
|
descendant = int(cols[3])
|
|
if descendant==-1: continue
|
|
print(f" {progenitor} -> {descendant};")
|
|
print("}")
|