'Determines whether the file is in gg format
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( \'test_space.txt\' )
>>> GenomeGraphs().sniff( fname )
False
>>> fname = get_test_fname( \'1.gg\' )
>>> GenomeGraphs().sniff( fname )
True'

def sniff(self, filename):

    with open(filename, 'r') as f:
        buf = f.read(1024)
    rows = [l.split() for l in buf.splitlines()[1:4]]
    if (len(rows) < 1):
        return False
    for row in rows:
        if (len(row) < 2):
            return False
        first_val = row[0]
        if (not VALID_GENOME_GRAPH_MARKERS.match(first_val)):
            return False
        rest_row = row[1:]
        try:
            [float(x) for x in rest_row]
        except ValueError:
            return False
    return True
