def split_jaspar_id(id):
    """
    Utility function to split a JASPAR matrix ID into its component base ID
    and version number, e.g. 'MA0047.2' is returned as ('MA0047', 2).
    """

    id_split = id.split('.')

    base_id = None
    version = None
    if len(id_split) == 2:
        base_id = id_split[0]
        version = id_split[1]
    else:
        base_id = id

    return (base_id, version)