'Determines whether the file is a frequency tabular format for chimera analysis
#1.14.0
0       0.000
1       0.000
155     0.975
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( \'mothur_datatypetest_true.mothur.freq\' )
>>> Frequency().sniff( fname )
True
>>> fname = get_test_fname( \'mothur_datatypetest_false.mothur.freq\' )
>>> Frequency().sniff( fname )
False'

def sniff(self, filename):

    headers = iter_headers(filename, sep=' DCTB ')
    count = 0
    for line in headers:
        if (not line[0].startswith('@')):
            if (count == 0):
                if ((not line[0].startswith('#')) and (len(line) == 1)):
                    return False
            else:
                if (len(line) != 2):
                    return False
                try:
                    int(line[0])
                    float(line[1])
                except Exception:
                    return False
            count += 1
    if (count > 1):
        return True
    return False
