"""R5 REF smoke test helper: copies a mix list and blanks the text of every 4th row (empty targets, as the clutter rows of mix_v1 have). Usage: python ref_smoke_blank_labels.py """ import sys lines = open(sys.argv[1], encoding="utf-8").read().split("\n") out = [lines[0]] n = 0 for i, line in enumerate(lines[1:]): if not line: continue f = line.split("\t") if i % 4 == 0: f[1] = "" n += 1 out.append("\t".join(f)) open(sys.argv[2], "w", encoding="utf-8").write("\n".join(out) + "\n") print("blanked", n, "of", len(out) - 1)