def define_separator(filename):
    """ Select separator for data values based on filename extension.
    Returns separator.
    """
    if filename.endswith(".tsv"):
        separator = "\t"
    else:
        separator = ","
    return separator