def pairwise_compare(afa, leven, threads, print_list, ignore_gaps):
    """
    make pairwise sequence comparisons between aligned sequences
    """
    # load sequences into dictionary
    seqs = {seq[0]: seq for seq in nr_fasta([afa], append_index = True)}
    num_seqs = len(seqs)
    # define all pairs
    pairs = ((i[0], i[1], ignore_gaps) for i in itertools.combinations(list(seqs.values()), 2))
    pool = multithread(threads)
    # calc percent identity between all pairs - parallelize
    if leven is True:
        pident = pool.map(compare_seqs_leven, pairs)
    else:
        compare = pool.imap_unordered(compare_seqs, pairs)
        pident = [i for i in tqdm(compare, total = (num_seqs*num_seqs)/2)]
    pool.close()
    pool.terminate()
    pool.join()
    return to_dictionary(pident, print_list)
make pairwise sequence comparisons between aligned sequences