'Determines wether the file is in maf format
The .maf format is line-oriented. Each multiple alignment ends with a blank line.
Each sequence in an alignment is on a single line, which can get quite long, but
there is no length limit. Words in a line are delimited by any white space.
Lines starting with # are considered to be comments. Lines starting with ## can
be ignored by most programs, but contain meta-data of one form or another.
The first line of a .maf file begins with ##maf. This word is followed by white-space-separated
variable=value pairs. There should be no white space surrounding the "=".
For complete details see http://genome.ucsc.edu/FAQ/FAQformat#format5
>>> from galaxy.datatypes.sniff import get_test_fname
>>> fname = get_test_fname( \'sequence.maf\' )
>>> Maf().sniff( fname )
True
>>> fname = get_test_fname( \'sequence.fasta\' )
>>> Maf().sniff( fname )
False'

def sniff(self, filename):

    headers = get_headers(filename, None)
    try:
        if ((len(headers) > 1) and headers[0][0] and (headers[0][0] == '##maf')):
            return True
        else:
            return False
    except:
        return False
