def get_dbtype_from_file_exten(infp):
    """Determine data type from fasta filename extension.
    """
    dbtype = None
    exten = infp.rsplit('.', 1)[1]
    if exten == 'faa':
        dbtype = 'prot'
    elif exten == 'fna':
        dbtype = 'nucl'
    assert dbtype is not None, """Could not determine data type for file:\n\t
        %s""" % infp
    return dbtype