def split_chrom_name(s):
    """
    Split chromosome name for comparison and sorting

    Splits a chromosome name into a list, to be
    used in comparison and sorting operations.

    For example:

    >>> split_chrom_name("chr1")
    ... [1]
    >>> split_chrom_name("chr17_gl000203_random")
    ... [17,"gl000203","random"]

    Arguments:
      s (str): chromosome name to split

    Returns:
      List: list representation of the name.
    """
    s0 = s.split('_')
    if s0[0].startswith('chr'):
        s0[0] = s0[0][3:]
        try:
            s0[0] = int(s0[0])
        except ValueError:
            pass
    return s0