def pairwise_compare(afa, leven, threads, print_list, ignore_gaps):
<EOL>seqs = {seq[<NUM_LIT:0>]: seq for seq in nr_fasta([afa], append_index = True)}<EOL>num_seqs = len(seqs)<EOL>pairs = ((i[<NUM_LIT:0>], i[<NUM_LIT:1>], ignore_gaps) for i in itertools.combinations(list(seqs.values()), <NUM_LIT:2>))<EOL>pool = multithread(threads)<EOL>if leven is True:<EOL><INDENT>pident = pool.map(compare_seqs_leven, pairs)<EOL><DEDENT>else:<EOL><INDENT>compare = pool.imap_unordered(compare_seqs, pairs)<EOL>pident = [i for i in tqdm(compare, total = (num_seqs*num_seqs)/<NUM_LIT:2>)]<EOL><DEDENT>pool.close()<EOL>pool.terminate()<EOL>pool.join()<EOL>return to_dictionary(pident, print_list)<EOL>
make pairwise sequence comparisons between aligned sequences