'Determines whether the file is a pairwise distance matrix (Column-formatted distance matrix) format
The first and second columns have the sequence names and the third column is the distance between those sequences.
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( \'mothur_datatypetest_true.mothur.pair.dist\' )
>>> PairwiseDistanceMatrix().sniff( fname )
True
>>> fname = get_test_fname( \'mothur_datatypetest_false.mothur.pair.dist\' )
>>> PairwiseDistanceMatrix().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 (len(line) != 3):
                return False
            try:
                float(line[2])
                try:
                    int(line[2])
                except ValueError:
                    all_ints = False
            except ValueError:
                return False
            count += 1
    if (count > 2):
        return (not all_ints)
    return False
