def fasta(self, key='<STR_LIT>', append_chain=True):
fastas = []<EOL>for s, chain in [(self.heavy, '<STR_LIT>'), (self.light, '<STR_LIT>')]:<EOL><INDENT>if s is not None:<EOL><INDENT>c = '<STR_LIT>'.format(chain) if append_chain else '<STR_LIT>'<EOL>fastas.append('<STR_LIT>'.format(s['<STR_LIT>'], c, s[key]))<EOL><DEDENT><DEDENT>return '<STR_LIT:\n>'.join(fastas)<EOL>
Returns the sequence pair as a fasta string. If the Pair object contains
both heavy and light chain sequences, both will be returned as a single string.

By default, the fasta string contains the 'vdj_nt' sequence for each chain. To change,
use the <key> option to select an alternate sequence.

By default, the chain (heavy or light) will be appended to the sequence name:

>MySequence_heavy

To just use the pair name (which will result in duplicate sequence names for Pair objects
with both heavy and light chains), set <append_chain> to False.