Truncate the FASTA headers so that the first field is a 4-character ID.

def reformat(found_sequences):
    '''Truncate the FASTA headers so that the first field is a 4-character ID.'''
    for (pdb_id, chain, file_name), sequence in sorted(found_sequences.iteritems()):
        header = sequence[0]
        assert(header[0] == '>')
        tokens = header.split('|')
        tokens[0] = tokens[0][:5]
        assert(len(tokens[0]) == 5)
        sequence[0] = "|".join(tokens)