Get the corresponding normal peptides for the tumor peptides that have already been subjected to
    mhc:peptide binding prediction.

    :param pandas.DataFrame mhc_df: The dataframe of mhc:peptide binding results
    :param dict iars: The dict of lists of tumor and normal peptide iar sequences
    :param str peplen: Length of the peptides to consider.
    :return: normal peptides and the updated results containing the normal peptides
    :rtype: tuple(pandas.DataFrame, list)

def _get_normal_peptides(job, mhc_df, iars, peplen):
    """
    Get the corresponding normal peptides for the tumor peptides that have already been subjected to
    mhc:peptide binding prediction.

    :param pandas.DataFrame mhc_df: The dataframe of mhc:peptide binding results
    :param dict iars: The dict of lists of tumor and normal peptide iar sequences
    :param str peplen: Length of the peptides to consider.
    :return: normal peptides and the updated results containing the normal peptides
    :rtype: tuple(pandas.DataFrame, list)
    """
    peplen = int(peplen)
    normal_peptides = []
    for pred in mhc_df.itertuples():
        containing_iars = [i for i, sl in iars.items() if pred.pept in sl[0]]
        assert len(containing_iars) != 0, "No IARS contained the peptide"
        if len(iars[containing_iars[0]]) == 1:
            # This is a fusion and has no corresponding normal
            normal_peptides.append('N' * peplen)
        else:
            # If there are multiple IARs, they all or none of them have to have a corresponding
            # normal.
            if len(set([len(y) for x, y in iars.items() if x in containing_iars])) != 1:
                job.fileStore.logToMaster('Some IARS were found to contain the substring but were'
                                          'inconsistent with the presence of a corresponding '
                                          'normal.')
                normal_peptides.append('N' * peplen)
            else:
                tum, norm = iars[containing_iars[0]]
                pos = tum.find(pred.pept)
                temp_normal_pept = norm[pos:pos + peplen]
                ndiff = pept_diff(pred.pept, temp_normal_pept)
                assert ndiff != 0
                if ndiff == 1:
                    normal_peptides.append(norm[pos:pos + peplen])
                else:
                    if len(tum) == len(norm):
                        # Too (2+) many single nucleotide changes to warrant having a normal
                        # counterpart. This might be an artifact
                        normal_peptides.append('N' * peplen)
                    else:
                        # There is an indel in play. The difference cannot be in the last AA as that
                        # would have come out properly in the first case. There is a possibility
                        # that the indel was in the first AA causing a shift. We can handle that by
                        # looking at the suffix.
                        pos = norm.find(pred.pept[1:])
                        if pos != -1:
                            # The suffix was found,
                            normal_peptides.append(norm[pos-1:pos + peplen])
                        else:
                            # The indel was too large to warrant having a normal counterpart
                            normal_peptides.append('N' * peplen)

    mhc_df['normal_pept'] = normal_peptides
    return mhc_df, normal_peptides