def parse_region_string(region):
    """
    Separate a region, such as "chr1:1000-2000", into a tuple of "name", "pos", and "end". The coordinates will
    be stripped of commas, if present, and cast as integers.

    :param region: Region string.

    :return: Tuple of "name", "pos", and "end" or `None` if the string could not be parsed.
    """

    a = region.split(':')

    if len(a) != 2:
        return None

    b = a[1].split("-")

    if len(b) != 2:
        return None

    b[0] = b[0].replace(',', '')
    b[1] = b[1].replace(',', '')

    return a[0], int(b[0]), int(b[1])