#!/usr/bin/env python3 """Show reference summary and incomplete cells.""" import json import sys ref = json.load(open(sys.argv[1])) print("protocol:", ref["protocol"], "| model:", ref["model"], "| cells:", len(ref["cells"]), "| sppc:", ref["samplesPerCell"]) tv = sum(c["validCount"] for c in ref["cells"].values()) tt = sum(c["totalCount"] for c in ref["cells"].values()) print(f"valid {tv}/{tt}") bad = [(cid, c["validCount"], c["totalCount"]) for cid, c in sorted(ref["cells"].items()) if c["validCount"] < c["totalCount"]] print("incomplete:", bad if bad else "NONE")