def write_query(seqdict, queryout):
    """Given a filled seqdict, writes the query."""
    
    print('Creating amino acid query file.')
    
    buffer = list()
    
    with open(queryout, 'w') as query:
        for gene, sequence in seqdict.items():
            buffer.append('>{}\n{}'.format(gene, sequence))
            
            if len(buffer) == 10000:
                print('\n'.join(buffer), file=query)
                buffer.clear()
        
        print('\n'.join(buffer), file=query)
        
    return None