mirror of
https://github.com/Findus23/halo_comparison.git
synced 2024-09-13 09:03:49 +02:00
39bb626a42
Formatted everything with black
18 lines
442 B
Python
18 lines
442 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("}")
|