1 # Copyright (C) The Lightning Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 from __future__ import print_function
11 """Check if a line is header."""
13 return line.startswith('#')
16 # CHROM 0, POS 1, REF 3
22 for line in sys.stdin:
23 if not is_header(line):
24 fields = line.split('\t')
28 if CHROM == previous_CHROM:
29 if POS > previous_end_POS:
31 previous_end_POS = max(previous_end_POS, POS + len(REF) - 1)
34 previous_end_POS = POS + len(REF) - 1
35 previous_CHROM = CHROM
39 if __name__ == '__main__':