def __read_tsv(tsvfile, delimiter=None):
    """
    Internal function for parsing a tsv file. Ignores empty lines and
    allows for comment lines (lines that start with a # symbol). Does not
    do any other sanity checking, however. 
    Parameters
    ----------

    tsvfile : str
        Path to a whitespace-separated datafile

    delimiter : str or None
        Allows you to define the string to split columns in the file. Default
        is any whitespace character. Default = None (any whitespace).


    Returns
    -----------
    list
        Returns a list of strings where each element in the list 

    
    """

    # read in file
    with open(tsvfile) as fh:
        content = fh.readlines()

    # parse through based on delimiter. Note if delimiter=None then
    # this uses the default 
    lines = []    
    for line in content:     

        # skip empty lines
        if len(line.strip()) == 0:
            continue

        # skip comment lines
        if line.strip()[0] == '#':
            continue
        
        lines.append(line.strip().split(delimiter))

    return lines