def plot_sequence_content(read_composition, title,
                          nucleotide_dict, ax, nucleotides='ACGT'):
    """Plots per base composition.

    Parameters
    ----------
    read_composition : DataFrame
        A DataFrame of per base content. Index is read coordinate. Columns are
        nucleotides in the order of ACGTN.
    title : str
        The title for the generated plot.
    nucleotide_dict : dict
        Color for each base.
    ax : Axes
        Axes for plotting.
    nucleotides : str, optional
        Selected nucleotides to visualize.

    Returns
    -------
    Axes
        Distribution of sequence content per base.
    """

    p_handles = list()
    for i in list(nucleotides):

        p = ax.plot(read_composition.index.values,
                    read_composition[i],
                    c=nucleotide_dict[i],
                    linewidth=1)
        p_handles.append(p[0])

    ax.legend(handles=p_handles,
              labels=list(nucleotides),
              loc='upper left',
              fontsize=6,
              frameon=True,
              shadow=False,
              framealpha=0)

    ax.set_title(label=title, fontsize=7)
    ax.tick_params(labelsize=6, labelcolor='black', direction='out')
    ax.xaxis.set_ticks(range(0, read_composition.shape[0], 2))

    ax.set_yticks(ax.get_yticks())

    limits_y = list(ax.get_ylim())
    if limits_y[0] < 0:
        limits_y[0] = 0
    if limits_y[1] > 1:
        limits_y[1] = 1
    ax.set_ylim(limits_y[0], limits_y[1])

    ax.set_yticklabels(labels=[f'{i:3,.1%}' for i in ax.get_yticks()])

    for i in ['top', 'bottom', 'left', 'right']:
        ax.spines[i].set_linewidth(w=0.5)
        ax.spines[i].set_color(c='#333333')

    ax.set_xbound(lower=-1, upper=read_composition.shape[0] + 1)

    a = (limits_y[1] - limits_y[0]) * 0.025
    ax.set_ybound(
        lower=limits_y[0] - a,
        upper=limits_y[1] + a)

    return ax