def parse_coordinate(coordinate):
    """
    Args:
        coordinate (str):
    Example:
        >>> parse_coordinate('chr1:153500000-153501000, chr1:153540000-153542000')
        ['chr1', 153500000, 153501000, 153540000, 153542000]
    Return:
         A list [chromosome] + [coordinate of four corners]
    """

    try:
        pos1, pos2 = [elm.strip() for elm in coordinate.split(',')]
        pos1 = pos1.replace(':', '-')
        c1, p11, p12 = [elm.strip() for elm in pos1.split('-')]
        pos2 = pos2.replace(':', '-')
        c2, p21, p22 = [elm.strip() for elm in pos2.split('-')]
        p11, p12, p21, p22 = int(p11), int(p12), int(p21), int(p22)
    except:
        raise ValueError('Invalid coordinate string!')

    if c1 != c2:
        raise ValueError('Intrachromosomal contacts only!')

    if p22 - p11 > 200000:
        raise ValueError('Short-distance contacts (within 200 kb) only!')

    return [c1, p11, p12, p21, p22]