def _frequent_localizations(df):
    """ returns the most frequent localization for any dependent peptide.
    In case of ties, preference is given to n-terminal modification which are
    biologically more likely to occur
    :param df: allPeptides.txt table.
    """
    max_count = int(df['DP AA count'].max())
    max_aa = set(df[df['DP AA count'] == max_count]['DP AA'].unique())
    result = {'DP AA max count' : max_count}
    if 'nterm' in max_aa:
        result['DP AA'] = 'nterm'
    else:
        result['DP AA'] = ';'.join(sorted(max_aa))
    return pd.Series(result)
returns the most frequent localization for any dependent peptide.
    In case of ties, preference is given to n-terminal modification which are
    biologically more likely to occur
    :param df: allPeptides.txt table.