def concat_align(fastas):
<EOL>fa2len = {}<EOL>seqs = {}<EOL>IDs = []<EOL>for fasta in fastas:<EOL><INDENT>seqs[fasta] = {}<EOL>for seq in parse_fasta(fasta):<EOL><INDENT>ID = seq[<NUM_LIT:0>].split('<STR_LIT:>>')[<NUM_LIT:1>].split()[<NUM_LIT:0>]<EOL>IDs.append(ID)<EOL>seqs[fasta][ID] = seq[<NUM_LIT:1>]<EOL><DEDENT>fa2len[fasta] = len(seq[<NUM_LIT:1>])<EOL><DEDENT>IDs = set(IDs)<EOL>concat = {}<EOL>for fasta in fastas:<EOL><INDENT>for ID in IDs:<EOL><INDENT>if ID not in concat:<EOL><INDENT>concat[ID] = []<EOL><DEDENT>if ID not in seqs[fasta]:<EOL><INDENT>concat[ID].append('<STR_LIT:->'*fa2len[fasta])<EOL><DEDENT>else:<EOL><INDENT>concat[ID].append(seqs[fasta][ID])<EOL><DEDENT><DEDENT><DEDENT>return concat<EOL>
concatenate alignments