def get_clipped_freq(records_l, records_r, records_s, minclip=4):
    """
    Get the number of reads that are clipped over the breakpoints in a meaningful way. For the left and right
    breakpoints, look for clipping in the SV. For the single breakpoint, look for clipping on either side of the read.

    :param records_l: Records over the left breakpoint.
    :param records_r: Records over the right breakpoint.
    :param records_s: Records over the single breakpoint.
    :param minclip: Minimum number of bases clipped to count the read as clipped.

    :return: A tuple of two elements: Proportion of reads clipped over the left and right breakpoints, and proportion
        of reads clipped over the single breakpoint (in that order).
    """

    if len(records_l) > 0 or len(records_r) > 0:
        clipped_lr = (
            len([True for key in records_l if records_l[key].clip_r >= minclip]) +
            len([True for key in records_r if records_r[key].clip_l >= minclip])
        ) / (len(records_l) + len(records_r))
    else:
        clipped_lr = 0

    if len(records_s) > 0:
        clipped_s = (
            len([True for key in records_s if records_s[key].clip_l >= minclip or records_s[key].clip_r >= minclip]) /
            len(records_s)
        )
    else:
        clipped_s = 0

    return clipped_lr, clipped_s