def read_gap_table(table_path, target_chromosome_name, size_cutoff=0):
    """
    Read tsv file describing gap locations with format convention:
        #bin	chrom	chromStart	chromEnd	...
        23	    chr1	122503247	124785432	...
        ...

    :param table_path:
    :param target_chromosome_name:
    :return:
    """
    coordinates = list()

    with open(table_path, "r") as file:
        for l,line in enumerate(file):
            if l == 0:
                continue
            if line.isspace():
                continue

            line = line.strip().split("\t")
            chromosome_name = line[1]
            start = line[2]
            end = line[3]
            type = line[-2]

            start = int(start)
            end = int(end)
            size = end - start

            if chromosome_name == target_chromosome_name:
                if size > size_cutoff:
                    coordinates.append([start,end])

    return coordinates