Files
lb_eda/src/parse_cov.py

12 lines
257 B
Python

import sys
from collections import defaultdict
import json
data = defaultdict(lambda: [])
for line in sys.stdin:
chrom, start, stop, _, depth = line.rstrip().split("\t")
data[f"{chrom}_{start}_{stop}"].append(depth)
print(json.dumps(dict(data)))